I have a function in a controller that takes in some specifications and generates a report on them. This function user_report is called in a view:
< %= submit_to
Just change the line:
send_data data.string, :type=>"application/excel", :disposition=>'attachment', :filename => @outfile
to:
send_data data.string.bytes.to_a.pack("C*"), :type=>"application/excel", :disposition=>'attachment', :filename => @outfile