in reply to Converting XLSX to CSV with Perl while maintaining the encoding
I've been using Spreadsheet::XLSX to convert
Note that according to Spreadsheet::Read, that module is strongly discouraged in favor of Spreadsheet::ParseXLSX. I'd suggest you switch to Spreadsheet::Read, it also includes an example xls2csv and xlsx2csv.
In this case, at least on a test file I have, the issue is that the strings returned from $cell->value() are undecoded UTF-8, and the quick fix is to add utf8::decode($trimcell); right after my $trimcell = $cell->value();.
|
---|