Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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
[karlgoethebier]: good morning
[Corion]: Hi karlgoethebier!
[karlgoethebier]: anybody ever noticed the double bracket operator: while (<<>>) {print;}?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-07-21 07:49 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (319 votes). Check out past polls.