Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Excel to csv

by sroux (Acolyte)
on Feb 22, 2012 at 20:29 UTC ( #955616=perlquestion: print w/replies, xml ) Need Help??
sroux has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks and apprentice monks, is there any easy way of converting xls files to csv format? Samples or useful CPAN modules appreciated! Many thanks for you interest.

Replies are listed 'Best First'.
Re: Excel to csv
by Tux (Abbot) on Feb 22, 2012 at 21:20 UTC

      xlscat and xls2csv are the tools that I would use and recommend.


Re: Excel to csv
by davies (Parson) on Feb 22, 2012 at 20:48 UTC

    In Re^3: Win32::OLE Excel search and replace commas, I show how to generate csv files from an existing Excel file, but this requires a machine with Excel. You may have to read the whole thread to follow all my comments, and since the thread isn't really what you're after, I suggest you start by looking at the code and raise any issues that you don't understand. Of course, if you can't run Excel, I'm wasting your time.


    John Davies

Re: Excel to csv
by Anonymous Monk on Feb 22, 2012 at 20:38 UTC
Re: Excel to csv
by blakew (Monk) on Feb 22, 2012 at 21:48 UTC
    $book->SaveAs(--with the csv constant as the filetype--);

    Update: Use the Win32::OLE module.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://955616]
Approved by davies
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2018-01-24 00:47 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (254 votes). Check out past polls.