title: Applying several styles to a cell in Excel spreadsheet with AXLSX gem
body: <p>I am using the <code>AXLSX</code> Ruby gem to generate Excel reports and I'm having a problem applying several styles to cells in a modular way.</p>
  
  <p>Here's an example that has just two styles ("on background" and "bold on background"),</p>
  
  <pre><code>require 'axlsx'
  
  axlsx = Axlsx::Package.new
  workbook = axlsx.workbook
  
  with_background = workbook.styles.add_style bg_color: "E2D3EB"
  bold_with_background = workbook.styles.add_style bg_color: "E2D3EB", b: true
  
  workbook.add_worksheet do |sheet|
    sheet.add_row
    sheet.add_row ["", "Product", "Category", "Price"], style: [0, bold_with_background, bold_with_background, bold_with_background]
    sheet.add_row ["", "Butter", "Dairy", 4.99], style: [0, with_background, with_background, with_background]
    sheet.add_row ["", "Bread", "Baked Goods", 3.45], style: [0, with_background, with_background, with_background]
    sheet.add_row ["", "Broccoli", "Produce", 2.99], style: [0, with_background, with_background, with_background]
  end
  
  axlsx.serialize "grocery.xlsx"
  </code></pre>
  
  <p>and here's the result,</p>
  
  <p><img src="https://i.stack.imgur.com/6n5XN.png" alt="enter image description here"></p>
  
  <p>Now, suppose I have to apply a border around this table. If I understand it correctly, I'll have to have a lot of styles to get there: "bold on backbroung with top left edge", "bold on background with top edge", "bold on backgound with top right edge", "on background with right edge", etc.</p>
  
  <p>Is there a way to apply several styles to cells instead of having to declare a style for each possible combination of base styles?</p>
  
  <p>I'd like to have something like</p>
  
  <pre><code>sheet["B2"].add_style(bold).add_style(background).add_style(top_left_edge)
  </code></pre>
  
  <p>but not sure if the gem implements a similar solution.</p>
  
  <p>Any ideas? Thanks!</p>