Hi Rick, First of all thanks for reply but the mail reached to me with new topic so I realized reply now.
Regarding send_file, it does not solve my problem because as I wrote at recent mail, as I understand from manual it send_file is used to display for already created file. My problem was setting header as excel and create a new file I solved my problem by using module Spreadsheet::WriteExcel On Thu, Sep 24, 2015 at 4:13 PM, Rick Leir <[email protected]> wrote: > > On Thu, Sep 24, 2015 at 7:00 AM, <[email protected]> wrote: >> >> >> >> return send_file( >> >> \$content, >> >> content_type => 'application/vnd.ms-excel', >> >> filename => "filename.xls", >> >> ); >> >> >> >> It goes without saying that given recent developments you should >> >> consider using Open Document Format instead ;-) >> > [KB] I will try and inform you as early as possible, thanks >> >> >> [KB] As I read from tutorial, send_file returns a file which already >> exists. It does not create a new file with new content. > > > This example sends html, but you could create other types of data. HTH. > > my $ret_html = <<HTDATA; > <!DOCTYPE html> > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> > <title>Example</title> > </head> > <body> > </body> > </html> > HTDATA > > send_file( \$ret_html, content_type => 'text/html'); > Cheers -- Rick > > > _______________________________________________ > dancer-users mailing list > [email protected] > http://lists.preshweb.co.uk/mailman/listinfo/dancer-users > -- Kadir Beyazlı Computer Engineer GSM : +90 535 821 50 00 _______________________________________________ dancer-users mailing list [email protected] http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
