amt has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I am trying to write an invoice in an Excel file as required by my specification. I am writing directly to the CGI stream by using:
This works well for the customers that have a small number of sites that need to be billed monthly, however, when generating an invoice for my largest customer, 242 rows, hangs my program. I can output up to about 120 rows, by limiting my query for billable service plans to 120, and I am aware that the Spreadsheet::WriteExcel is limited to ~7MB for the BIFF that is used by the module.
Any hints or suggestions are greatly appreciated. I am considering breaking this out of my CGI program and simply writing an external script to primatively fork out to do this function and return the location of the file on the filesystem that I just created, then read the file in and then print the file to the CGI stream as a download.
I am trying to write an invoice in an Excel file as required by my specification. I am writing directly to the CGI stream by using:
print "Content-type: application/pascrm-download\n"; print "Content-Disposition: attachment; filename=$file\n\n"; my $workbook = Spreadsheet::WriteExcel->new("-");
This works well for the customers that have a small number of sites that need to be billed monthly, however, when generating an invoice for my largest customer, 242 rows, hangs my program. I can output up to about 120 rows, by limiting my query for billable service plans to 120, and I am aware that the Spreadsheet::WriteExcel is limited to ~7MB for the BIFF that is used by the module.
Any hints or suggestions are greatly appreciated. I am considering breaking this out of my CGI program and simply writing an external script to primatively fork out to do this function and return the location of the file on the filesystem that I just created, then read the file in and then print the file to the CGI stream as a download.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Spreadsheet::WriteExcel with CGI
by ChemBoy (Priest) on Dec 08, 2005 at 21:47 UTC | |
by amt (Monk) on Dec 09, 2005 at 15:56 UTC | |
by ChemBoy (Priest) on Dec 11, 2005 at 17:43 UTC | |
Re: Spreadsheet::WriteExcel with CGI
by davidrw (Prior) on Dec 08, 2005 at 21:28 UTC | |
Re: Spreadsheet::WriteExcel with CGI
by dragonchild (Archbishop) on Dec 09, 2005 at 04:28 UTC | |
Re: Spreadsheet::WriteExcel with CGI
by helphand (Pilgrim) on Dec 11, 2005 at 20:16 UTC |
Back to
Seekers of Perl Wisdom