Set the background color of a cell or row in google spreadsheet using gogle google_drive on ruby

I am trying to set the background color for the cell and row, and I am using the google_drive gem. This gem of the table seems to have this option.

format = Spreadsheet::Format.new :color=> :blue, :pattern_fg_color => :yellow, :pattern => 1

if this gem also has this option, let me know!

Thanks at Advance.

+5
source share
1 answer

The problem is that you are trying to set the background color by setting :color => :blue. Install instead :pattern_bg_color => :blue.

All parameters: :bottom_color, :top_color, :left_color, :right_color, :pattern_fg_color, :pattern_bg_color, :diagonal_color

Hope this helps!

+1
source

All Articles