I am using axlsx
gem to generate Excel sheets in Ruby on Rails.
I have this line which adds a row to an Excel sheet
current_row = sheet.add_row [v1, v2, v3], :style => style1
Now, v1, v2 & v3
in the above code are currency values. And any of these 3 values could be a negative value as well.
Now, whichever value is negative, I would like that value to be displayed in red text font (NOT background color). If the value is positive, then the text should be in normal black color.
How can I achieve this conditional text color?