[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Re: Report generation...


On 2004-08-23, Tim Howell <suppressed> wrote:
> I'm working on an application that has a report generation mode that
> generates a report as an Excel spreadsheet that is then sent to the
> client.  I can think of several ways to do this, but the idea I'm
> currently toying with is having my CGI::App exec a separate script that
> generates the report.  I'm not sure yet if I will write the report to
> disk and then present the user with a link to that, have the CGI::App
> load it and send it to the user, or have the report returned directly to
> the CGI::App.
>
> What methods are you guys using?

Tom,

Both of your approaches are useful, depending on how long the report
takes to generate. 

My favorite wait to generate Excel spreadsheets is to use HTML::Template
to generate an HTML table, but send the Excel content type header with
it. This works great as long as your report can be expressed as HTML
table, and doesn't contain any embedded formulas, etc.

The document will be opened and translated automatically by Excel, so
the user won't even notice that anything is "funny".

	Mark

--
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   suppressed     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.