Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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?
[LanX]: interesting the author doesn't seem to accept javascript as a scripting language
[LanX]: ... and calls php7 the winner oO
[RonW]: RPerl is only a curiosity to me. I can see where some one who primarily codes in Perl might find RPerl useful, but to me, given the choice between RPerl's restrictions and C, I'd choose C

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-05-22 20:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?