Enter a column with a table with a table

Today I started using spreadsheet gem to make my excel files, but one of my columns is a date, and I want to format this column as a date. It looks like it's out there somewhere, with the date method in Spreadsheet :: Excel :: Row, but I can't get it to work.

Any hero out there?

+3
source share
2 answers

In fact, it turned out, with Spreadsheet:Formatyou have the option:number_format

So now I use this code

date = Spreadsheet::Format.new :number_format => 'MM/DD/YYYY'
...
sheet.row(i).set_format(0, date)
...
sheet[i, 0] = Date.today
+3
source

I think there is no fotmat date picker. you are crazy.

0
source

Source: https://habr.com/ru/post/1753808/


All Articles