<?xml version="1.0" encoding="windows-1252"?>
<node id="515372" title="Spreadsheet::WriteExcel with CGI" created="2005-12-08 15:42:01" updated="2005-12-08 10:42:01">
<type id="115">
perlquestion</type>
<author id="381595">
amt</author>
<data>
<field name="doctext">
Monks,&lt;br&gt;
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:&lt;br&gt;
&lt;code&gt;print "Content-type: application/pascrm-download\n";
print "Content-Disposition: attachment; filename=$file\n\n";
my $workbook = Spreadsheet::WriteExcel-&gt;new("-");
&lt;/code&gt;&lt;br&gt;
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.&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;&lt;br&gt;


&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-381595"&gt;
amt.&lt;br&gt;&lt;br&gt;
&lt;a href="http://www.perldoc.com/perl5.8.4/pod/perlcheat.html"&gt;perlcheat&lt;/a&gt;
&lt;/div&gt;&lt;/div&gt;</field>
</data>
</node>
