in reply to Re: Re: Re: capturing STDOUT
in thread capturing STDOUT
My below is script not generating STDOUT in browser. I followed the instructions u have given bt didn't work.. Can someone help on this..
#!/appl/CW_NETCOOL/PERL/bin/perl use strict; use Spreadsheet::WriteExcel; use CGI qw(:standard); # Set the filename and send the content type my $filename ="cgitest.xls"; print "Content-type: application/vnd.ms-excel\n"; #print "Content-Disposition: attachment; filename=$filename\n\n"; # Create a new workbook and add a worksheet. The special Perl filehand +le will # redirect the output to STDOUT # binmode(STDOUT); my $workbook = Spreadsheet::WriteExcel->new(\*STDOUT); my $worksheet = $workbook->addworksheet(); # Set the column width for column 1 $worksheet->set_column(0, 0, 20); # Create a format my $format = $workbook->addformat(); $format->set_bold(); $format->set_size(15); $format->set_color('blue'); # Write to the workbook $worksheet->write(0, 0, "Hi Excel!", $format); $workbook->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: capturing STDOUT
by tobyink (Canon) on Oct 09, 2012 at 20:31 UTC | |
by Anonymous Monk on Oct 10, 2012 at 17:48 UTC | |
by tobyink (Canon) on Oct 10, 2012 at 21:34 UTC | |
by Anonymous Monk on Oct 11, 2012 at 08:53 UTC | |
by Corion (Patriarch) on Oct 11, 2012 at 08:58 UTC | |
|