gb123z has asked for the wisdom of the Perl Monks concerning the following question:
The code runs, but it looks like the output is printed to the web page, not excel. It has been awhile since I setup a site to use perl/cgi script. Have I missed a security setting somewhere in IIS, do you have any suggestions? Thanks. Greguse strict; use CGI ':standard'; use CGI::Carp qw/fatalsToBrowser/; use DBD::ODBC; use strict; use List::Util qw[min max]; #use warnings; use Spreadsheet::WriteExcel; my $filename = "mydata.xls"; # generated on-the-fly print "Content-disposition: attachment;filename=$filename\n"; print "Content-type: application/vnd.ms-excel\n\n"; my $workbook = Spreadsheet::WriteExcel->new("-"); my $worksheet = $workbook->add_worksheet(); $worksheet->write(0, 0, "Hello"); $worksheet->write(0, 1, "world");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Spreadsheet:: WriteExcel
by Corion (Patriarch) on Mar 12, 2009 at 16:07 UTC | |
by gb123z (Initiate) on Mar 12, 2009 at 19:14 UTC | |
|
Re: Spreadsheet:: WriteExcel
by VinsWorldcom (Prior) on Mar 12, 2009 at 16:55 UTC | |
by gb123z (Initiate) on Mar 12, 2009 at 18:11 UTC | |
by VinsWorldcom (Prior) on Mar 13, 2009 at 14:13 UTC | |
|
Re: Creating Excel File with Perl
by Bloodnok (Vicar) on Mar 12, 2009 at 19:22 UTC |