"Homsher, Dave V." wrote:
> 
> I am using Spreadsheet::WriteExcel to create an Excel doc (hence the name)
> but I keep getting blank documents back.
> 
> The module can write to a file or to STDOUT using '-'. From the archives I
> see that this is similar to an issue with Apache::Magick where the C STDOUT
> (expressed as '-' or '>-') is different from Perl's default STDOUT.
> 
> ... 
>
>         my $workbook = Spreadsheet::WriteExcel->new("-");
> #       my $workbook = Spreadsheet::WriteExcel->new(STDOUT);
> 

If you don't get STDOUT method to work, you could try writing
it to a file as in

  Apache->register_cleanup(sub { unlink("/tmp/excel.$$"});
  my $workbook = Spreadsheet::WriteExcel->new("/tmp/excel.$$");
  ... then read file & print to output ...

I would use this method first anyway just to make sure 
a spreadsheet gets created before trying to get it to go
straight to STDOUT.  
  
--Josh

Reply via email to