3

Here is my code and I want to add background color in full sheet not in a specific row or column.

xlsx_package = Axlsx::Package.new
   wb = xlsx_package.workbook
wb.add_worksheet(:name => "Basic Worksheet") do |sheet|
  sheet.add_row ["First Column", "Second", "Third"]
  sheet.add_row [1, 2, 3]
end

Any help will be appreciated! Thank you.

Chitra
  • 1,294
  • 2
  • 13
  • 28
  • i suppose you can use loop to go through all the rows and set bg_color simply. no need to wait for a one unique solution for that. – Abhinay Sep 28 '15 at 13:45
  • @ Abhinay, your saying is right but my requirement is quite different from this. First I need to set a background color for all sheet and a different color for each data row. – Chitra Sep 29 '15 at 06:12

0 Answers0