![]() |
|
P is for Practical | |
PerlMonks |
Re: CSV to Excelby Tux (Abbot) |
on Jun 09, 2010 at 06:19 UTC ( #843814=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|