Help in the excel

P

Pranjal Jain

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 :)
 
D

David Mullet

Pranjal said:
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 :)

Set the .Font.ColorIndex value of your range:

$worksheet.Range("c#{b+1}").Font.ColorIndex = 50

More color index values here:

http://www.ozgrid.com/VBA/ReturnCellColor.htm

Hope that helps.

David

http://rubyonwindows.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top