Spreadsheet Date format

R

Reg Exes

Hello,

I'm trying to use the Spreadsheet library to create a spreadsheet.
Since I'm rather new to Ruby, I'm running into problems. :)

Version --> spreadsheet (0.6.4.1)

What I'm trying to do is set a "date" format in all the cells of a
column. I can't seem to find anywhere how to set the date though...

I've tried to infer from http://www.ruby-forum.com/topic/178230#new how
to do so...

book = Spreadsheet::Workbook.new
sheet1 = book.create_worksheet
sheet1.name = 'test'
date_format = Spreadsheet::Format.new:)number_format => '??what goes
here??')
sheet1.format_column, date_format <-- this is syntactically wrong?

or what is the correct way to set a date format?

Any help would be appreciated!

Regards
Brandon
 

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

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top