valavanp has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
When i write the CGI output to an excel file by using the below code it works fine.
But when i write the above coding by inserting a line between the print statement and the content type as shown i get the file printed directly in the browser, not in the excel format. I don't know the reason for that. So Monks your valuable thoughts in the above. Thanks.#!/usr/bin/perl -w use CGI; use strict; print <<test_header; Content-type: application/msexcel Content-Disposition: attachment; filename= test.xls ID;PWXL;N;E P;PGeneral P;P0 P;P0.0 P;P0.00 test_header
print <<test_header; Content-type: application/msexcel Content-Disposition: attachment; filename= test.xls ID;PWXL;N;E P;PGeneral P;P0 P;P0.0 P;P0.00 test_header
20060927 Janitored by Corion: Added code tags, as per Writeup Formatting Tips
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI Output in an excel file
by davorg (Chancellor) on Sep 27, 2006 at 09:26 UTC | |
Re: CGI Output in an excel file
by radiantmatrix (Parson) on Sep 27, 2006 at 14:54 UTC | |
Re: CGI Output in an excel file
by pbeckingham (Parson) on Sep 27, 2006 at 14:35 UTC |
Back to
Seekers of Perl Wisdom