Generating Excel documents with Ruby

2020-03-25 04:12发布

I need to generate Excel documents with Ruby (from Rails) on a Linux machine. I know of Spreadsheet::Excel, but it doesn't support formulas, and uses a pretty old format.

Is there any other option, not necessarily free or open source, that is a bit more powerful?

4条回答
戒情不戒烟
3楼-- · 2020-03-25 04:54

I have come across the gem simple_xlsx_writer.

You can see the example of how to use it over here.

Hope it helps.

查看更多
疯言疯语
4楼-- · 2020-03-25 05:00

How about opening a spreadsheet (Spreadsheet::Excel) with the formulae already populated. Entering data into the referenced cells will cause them to display the result.

查看更多
走好不送
5楼-- · 2020-03-25 05:03

How about https://github.com/randym/axlsx

This gem can easily generate spreadsheets in the OOXML format (Open Office XML)

查看更多
登录 后发表回答