Method: Axlsx::Worksheet#row_style
- Defined in:
- lib/axlsx/workbook/worksheet/worksheet.rb
#row_style(index, style, options = {}) ⇒ Object
Note:
You can also specify the style in the add_row call
Set the style for cells in a specific row
300 301 302 303 304 305 306 307 308 |
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 300 def row_style(index, style, ={}) offset = .delete(:col_offset) || 0 rs = @rows[index] if rs.is_a?(Array) rs.each { |r| r.cells[(offset..-1)].each { |c| c.style = style } } else rs.cells[(offset..-1)].each { |c| c.style = style } end end |