On Fri, Jun 25, 2010 at 1:30 PM, Ludwig Isaac Lim <ludz_...@yahoo.com> wrote:
> Hi:
>
>    I'm writing a CGI application in PERL running on HP-UX that needs to export
> its query results to an Excel file.
>
>    My alternatives are :
>       a) export it using perl module Text::CSV, but the set the CGI headers to
> Excel via print header(-type => 'application/vnd.ms-excel');
>    b) Use    Spreadsheet::WriteExcel to generate excel binary files.
>
>    I'm inclined to use method "A" as I've used Text::CSV before, and I see 
> that
> Spreadsheet::WriteExcel is dependent on module Win32::OLE (Not sure if
> Win32::OLE will work HP-UX or UNIX / Linux systems).
>
>     Thoughts? Anybody here that used Perl CGI and Excel before? Thanks in
> advance

Task::Kensho[0] lists several modules for Excel parsing (here's a list
straight out of its Makefile.PL):

feature 'Excel / CSV',
  -default                          => 0,
  'Text::CSV_XS'                    => 0,
  'Spreadsheet::ParseExcel::Simple' => 0,
  'Spreadsheet::WriteExcel::Simple' => 0,
  ;

I have these installed on my Ubuntu (along with other Task::Kensho
modules) as I use them myself, albeit not often.  I notice that you're
writing a webapp; have you seen Mojolicious,[1] a web framework
(especially useful as by itself it doesn't have any dependencies
beyond perl 5.8 ;)  Since your app writes an Excel spreadsheet, it'd
be probably a cinch to write a MojoX::Renderer for this... >:)

Also, Spreadsheet::WriteExcel doesn't particularly depend on
Win32::OLE (at least in the latest version.)  See the CPAN
dependencies chart for this.[2]

[0]  http://search.cpan.org/perldoc?Task::Kensho
[1]  http://mojolicious.org
[2]  
http://deps.cpantesters.org/?module=Spreadsheet::WriteExcel::Simple;perl=latest

-- 
Zak B. Elep  ||  zakame.net
1486 7957 454D E529 E4F1  F75E 5787 B1FD FA53 851D
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to