Hi everyone,
I working on an app that at some point generates an xls report(charts,
summary lines, etc) and sends it to the user.
If i use link_to everything works fine; however when change to
link_to_remote so i can make an ajax call it doesn;t seam to work ( i
do not get the save/open dialog box)
def exp_to_excel_2003
@filepath = “#{RAILS_ROOT}/public/files/Metrics Report.xls”
send_file(@filepath ,
:disposition => ‘attachment’,
:filename => “Metrics Reports.xls”,
:encoding => ‘utf8’,
:type => ‘application/octet-stream’)
end
Can anyone help?! Any input is appreciated.
Thank you,