Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: What is the best module for parsing Excel documents

by strat (Canon)
on Oct 22, 2007 at 08:50 UTC ( #646383=note: print w/replies, xml ) Need Help??


in reply to What is the best module for parsing Excel documents

If you have Win32::OLE installed (I don't know if this is possible under Cygwin), you could have a look at ExcelPerl, e.g. convert the file to csv with something like:

perl excelPerl.pl -begin "use Text::CSV_XS; $csv = Text::CSV_XS->new( +{ binary => 1 } )" -ane "$csv->combine(@F); print $csv->string, $/" - +f test.xls > outfile.csv

Or if you want to keep the formulas:

perl excelPerl.pl -begin "use Text::CSV_XS; $csv = Text::CSV_XS->new( +{ binary => 1 } )" -ane "$csv->combine( map { $_->{FormulaLocal} } @C +); print $csv->string, $/" -f test.xls > outfile.csv

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://646383]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2016-10-01 23:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (9 votes). Check out past polls.