开发者

Rails: export to .xlsx (Office 2007) spreadsheet

Took over an existing Rails 2.3.x app. Need to export some data to xlsx format(Excel 2007). Unfortunately I cant use plain XLS format as it has a limit of 256 columns per sheet. The data the app exports goes beyond that limit.

Are there any existing gems/plug-ins that can generate XLSX files?

I have google-ed for answers, but nothing worked so far.

I have tried installing simple_xlsx_writer gem, and did the usual gem.config "simple_xlsx_writer" but it kept complaining that it couldn't find the required gem. (e.g. "Missing these required gems: simple_xlsx_writer "). Which is weird as I开发者_C百科 have it installed.

Looked at roo gem, but it only has the ability read xlsx files. So not good.

Open to any other suggestions so as long as the data can be opening in Excel. Thanks in advance.


Have you seen the AXLSX Gem? You may have to require you database adapter manually and build the export by still possible. This can an entire workbook sheets, charts, etc. The only caveat I found is that charts cannot be their own sheet.

https://github.com/randym/axlsx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜