randym/axlsx — Issue #16: Competing styles: cell vs row vs col
Author: dkmdnielsen
Created: 2012-01-13 15:58:16+00:00
State: open

From what I gathered of the code, it appears you are taking care in handling "precedence" of styles. Meaning..styles applied to individual cells would take precedence over styles applied to rows. Cells have their styles and rows have their styles. Given the following:

```ruby
ws.rows[0..2].each {|row| row.cells[(0..2)].each {|cell| cell.style = @hdr_style} }
ws.col_style(0,@wb.styles.add_style(:alignment=>{:horizontal =>:left}))
```

I expected the style applied at the cell level (first statement) to have precedence over that applied by the second statement (which is at the column level). What had happened was that the second statement _replaced_ the styles set by the first statement. @hdr_style is blue background, bold, centered. All that was lost.

Am I understanding this correctly? Is there a potential problem here? I wish I had more time to dig into this myself, but the project that is relying on your technology is keeping me busy.
Thanks, dvn