HI All
I want to insert the data into the Excel sheet, but I wish the data to
be inserted in Excel Sheet is not in black color but in green color.
I had tried the following code for it, but it is not working.
Can anybody has the solution for it.
$worksheet.Range(“c#{b+1}”).Value = “Login page
verified.”.colorize(:green)
puts “\nWeb page opened successfully\n”.colorize(:green)
Thankx in advance ![:slight_smile: :slight_smile:](//test.ruby-forum.com/images/emoji/twitter/slight_smile.png?v=6)
Pranjal J. wrote:
HI All
I want to insert the data into the Excel sheet, but I wish the data to
be inserted in Excel Sheet is not in black color but in green color.
I had tried the following code for it, but it is not working.
Can anybody has the solution for it.
$worksheet.Range(“c#{b+1}”).Value = “Login page
verified.”.colorize(:green)
puts “\nWeb page opened successfully\n”.colorize(:green)
Thankx in advance ![:slight_smile: :slight_smile:](https://www.ruby-forum.com/images/emoji/apple/slight_smile.png?v=12)
Set the .Font.ColorIndex value of your range:
$worksheet.Range(“c#{b+1}”).Font.ColorIndex = 50
More color index values here:
Return Excel Color Index Number or Color as Text. Excel VBA Custom Formula
Hope that helps.
David