Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: CSV to Excel

by Tux (Abbot)
on Jun 09, 2010 at 06:19 UTC ( #843814=note: print w/replies, xml ) Need Help??


in reply to CSV to Excel

Text::CSV_XS comes with csv2xls in the examples folder. I use that in production code for customers on an almost daily basis.

Others suggest to open CSV with Excel directly. This might work, but more likely is very error-prone. Excel converts many "things" is the imported data based on various outside settings, like locale and local list-separator characters. That means that your numbers might turn into dates, and your (ISO)dates YYYYMMDD suddenly become dates in braindead US format (MM/DD/YY), even if the CSV data was quoted!

For that last problem, csv2xls has the -D option, in which you can specify what columns represent dates and a -d option to specify the required date format.


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2020-01-22 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?