I am trying to parse an excel spreadsheet using "spreadsheet". How could I get the background color of each row?
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet :name => 'Name'
format = Spreadsheet::Format.new :color=> :blue, :pattern_fg_color => :yellow, :pattern => 1
sheet.row(0).set_format(0, format) #for first cell in first row
or
sheet.row(0).default_format = format #for entire first row
you can iterate over each row/cell and apply style exactly where you want