Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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.

      --
      John.

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.

    Regards,

    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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://955616]
Approved by davies
help
Chatterbox?
[Corion]: Oh yay. The (external, not guided by me) programmers have chosen Moose+DBIx::Class for some implementation, and now seem to do 1+n SELECT statements for each row, as is usual when using ORMs.
[Corion]: So maybe I should investigate how to plug in a cache in front of DBIx::Class so I can do a ->selectall_hashre f and then satisfy the "sub"-selects from that cached single SELECT statement ...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-09-25 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (279 votes). Check out past polls.

    Notices?