Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Dealing with Excel file multiple worksheets in BASH/PERL

by ZWcarp (Beadle)
on Dec 13, 2011 at 18:55 UTC ( #943405=perlquestion: print w/ replies, xml ) Need Help??
ZWcarp has asked for the wisdom of the Perl Monks concerning the following question:

Hey all, I am dealing with a Excel file that has a good deal of tabbed worksheets associated with it. I just want them all to be separate tab delimited text files, but do not want to manually copy each one out as this would take forever. Does anyone know how to handle this sort of file in unix ? thanks!!

Comment on Dealing with Excel file multiple worksheets in BASH/PERL
Re: Dealing with Excel file multiple worksheets in BASH/PERL
by MidLifeXis (Prior) on Dec 13, 2011 at 18:58 UTC

    You might want to search CPAN for spreadsheet and see what it gives you.

    --MidLifeXis

Re: Dealing with Excel file multiple worksheets in BASH/PERL
by marto (Chancellor) on Dec 13, 2011 at 19:29 UTC
Re: Dealing with Excel file multiple worksheets in BASH/PERL
by Tux (Monsignor) on Dec 13, 2011 at 19:31 UTC

    Install Spreadsheet::Read and use xlscat:

    $ for sheet in 1 2 3 4 5 ; do > xlscat -s'\t' -S$sheet file.xls >file-$sheet.tsv > done

    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2014-09-17 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (56 votes), past polls