Reputation: 6464
I have a list of email-ids stored in a variabe ( Say @emails
). This list is being generated in a controller inside an action. This action is specifically made for this purpose. Now I want to enable the user to download this list other than viewing it as HTML. I am unable to find a way of doing it. (Also there is no model associated with emails so I think the approach described in Railscasts won't work here)
Upvotes: 2
Views: 7678
Reputation: 6025
I've been using the axlsx_rails gem for this. Easy to install and to use.
https://github.com/randym/axlsx
Upvotes: 1
Reputation: 911
for that follow these links:-
http://railscasts.com/episodes/362-exporting-csv-and-excel
Upvotes: 0