Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Converting XLSX to CSV with Perl while maintaining the encoding

by Tux (Abbot)
on Feb 25, 2020 at 13:39 UTC ( #11113402=note: print w/replies, xml ) Need Help??


in reply to Converting XLSX to CSV with Perl while maintaining the encoding

Other than the already given advice to use Spreadsheet::ParseXLSX, your code is wrong in that it generated invalid CSV if any of your cells contains " characters.

Consider using Text::CSV_XS and/or Text::CSV for the generation of valid CSV.

Even if your current speadsheeft does not hit this problem, your approach is likely to generate invalid CSV in other cases too.


Enjoy, Have FUN! H.Merijn
  • Comment on Re: Converting XLSX to CSV with Perl while maintaining the encoding
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2020-04-07 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (43 votes). Check out past polls.

    Notices?