Pradeep Sapkota
Pradeep Sapkota

Reputation: 2072

Exporting to excel in rails using roo gem

I'm exporting some data from table to excel. I'm using roo gem. It seems import is working but there is not sufficient documentation in gem's github repo.

I want to know how to use view file to render data and respond with xlsx format using respond_to.

respond_to do |format|
    format.xlsx
end

Highly appreciated if anyone can provide examples of this.

Upvotes: 1

Views: 4129

Answers (1)

Vasfed
Vasfed

Reputation: 18454

From https://github.com/roo-rb/roo :

Roo implements read access for all common spreadsheet types

for writing you might want to use something like caxlsx_rails

Upvotes: 1

Related Questions