HI,
When I run the below example an Excel spreadsheet opens in the browser (IE 5.5, Windows 2000) but it is empty.
No matter what I tried, it always opens empty.
Anybody knows what the problem is?
Also, what is meaning of the last line in the example description ("This can be useful for CGIs which have a Content-type of application/vnd.ms-excel"
???
Thanks.
Following is the description and the example:
2.4.6 Spreadsheet::WriteExcel Example: Output to browser
You can redirect the Spreadsheet::WriteExcel output to STDOUT using the special Perl filehandle "-". This can be useful for CGIs which have a Content-type of application/vnd.ms-excel:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
print "Content-type: application/vnd.ms-excel\n\n";
my $workbook = Spreadsheet::WriteExcel->new("-"
;
$workbook->write(0, 0, "Hi Excel!"
;
When I run the below example an Excel spreadsheet opens in the browser (IE 5.5, Windows 2000) but it is empty.
No matter what I tried, it always opens empty.
Anybody knows what the problem is?
Also, what is meaning of the last line in the example description ("This can be useful for CGIs which have a Content-type of application/vnd.ms-excel"
Thanks.
Following is the description and the example:
2.4.6 Spreadsheet::WriteExcel Example: Output to browser
You can redirect the Spreadsheet::WriteExcel output to STDOUT using the special Perl filehandle "-". This can be useful for CGIs which have a Content-type of application/vnd.ms-excel:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
print "Content-type: application/vnd.ms-excel\n\n";
my $workbook = Spreadsheet::WriteExcel->new("-"
$workbook->write(0, 0, "Hi Excel!"