Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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:
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.

amt.

perlcheat

In reply to Spreadsheet::WriteExcel with CGI by amt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (9)
    As of 2014-08-22 15:11 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (159 votes), past polls