RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: piyush
Site: http://blog.thebrainpoint.com/
I am pasting my code here, it does the following - downloads the file, not only make it in file system - libre complaint, also windows, and browser
Even though I dont like to write and delete , but with spreadsheet seems like the only solution.
puts "# write the file book.write "Employee_History_#{ params[:id]}.xls" # send the file send_file "Employee_History_#{ params[:id]}.xls", :type => "application/vnd.ms-excel", :filename => "data.xls", :stream => false # and then delete the file File.delete("Employee_History_#{ params[:id]}.xls")"
I am pasting my code here, it does the following
- downloads the file, not only make it in file system
- libre complaint, also windows, and browser
Even though I dont like to write and delete , but with spreadsheet seems like the only solution.
I am pasting my code here, it does the following
- downloads the file, not only make it in file system
- libre complaint, also windows, and browser
Even though I dont like to write and delete , but with spreadsheet seems like the only solution.