caxlsx / caxlsx_rails

A Rails plugin to provide templates for the axlsx gem
MIT License
742 stars 84 forks source link

Add date format on specific column #89

Closed brijeshs-atharvasystem closed 6 years ago

brijeshs-atharvasystem commented 7 years ago

Hi

I would like add date format on specific column. So by default values are shown based on specific date format. How I can do that?

Thanks Brijesh Shah

straydogstudio commented 7 years ago

Have you tried using a custom date format?

https://github.com/randym/axlsx/blob/master/examples/example.rb#L324-L340

https://gist.github.com/randym/3719401

brijeshs-atharvasystem commented 7 years ago

Thanks for reply. I checked these articles. I think these will help to apply on row / cell rather than specific column. I would like to apply date format on specific column.

straydogstudio commented 7 years ago

I'm not an Axlsx expert, but my understanding is all styles are applied by cell as you add each row of data. You might get better answers through the Axlsx issues page:

https://github.com/randym/axlsx/issues