December 8, 2008
Posted by roadburn
Rails export to excel spreadsheet
1 | $ sudo gem install spreadsheet |
More help:
http://codeclimber.blogspot.com/2008/11/reporting-in-excel-with-rails.html
http://spreadsheet.rubyforge.org/
To send and save through browser
Taken from https://rubyforge.org/forum/forum.php?thread_id=29606&forum_id=2920
1 2 3 4 | require 'stringio' data = StringIO.new '' book.write data send_data data.string, :type=> "application/excel", :disposition=> 'attachment', :filename => 'MeaningfulName.xls' |
No Comments Yet
You can be the first to comment!
Leave a comment