1

I want to generate xlsx file but Spreadsheet genrates xls
How to generate the xlsx file using the same gem ?

  • 2
    https://github.com/zdavatz/spreadsheet/issues/220 https://github.com/zdavatz/spreadsheet/issues/193 https://github.com/zdavatz/spreadsheet/issues/16 --- This gem does not support XLSX. – Tom Lord May 29 '19 at 12:59

1 Answers1

2

You may want to use the roo gem instead as it supports XLSX format. It's also more well supported as the spreadsheet gem has not been updated in 5 years, and spreadsheet gem does NOT support XLS format.

lacostenycoder
  • 10,623
  • 4
  • 31
  • 48
  • what if I want to use the same gem ? – Mohamed Barakat May 29 '19 at 12:39
  • That gem does not support the XLSX format. But XLS should be supported by all versions of Excel so you should be able to convert simply by opening the XLS file in Excel, than saving to XLS format if you need to. There are other ways to convert the file if you need to. Maybe see https://stackoverflow.com/questions/31606394/convert-csv-to-xlsx-using-command-line – lacostenycoder May 29 '19 at 13:27
  • I was going to recommend the [axlsx](https://github.com/randym/axlsx) gem, but wow the roo gem looks really interesting! Great tip! – nathanvda May 29 '19 at 13:52