in reply to Spreadsheet::ParseXLSX returning zero

Several years ago, I had a similiar problem, because the spreadsheed module I used at the time was not able to handle background colo(u)rs. My solution involved creating a macro in OpenOffice, and in the Perl script I had
system ('C:\Program Files (x86)\OpenOffice 4\program\scalc.exe', '-headless', 'macro:///Standard.Module1.ConvertToHtml("' . $xlsx . '","' . +$file->canonpath . '")') if ! $file->exists;
and using the resulting file. Sadly, I don't have the macro anymore, but I remember it was very short (some "open" and "save as"), similiar to simply open and hit "save".

I don't remember why I used OpenOffice instead of Excel. Perhaps it was easier to call the parameterized macro from Perl, but maybe not...

Replies are listed 'Best First'.
Re^2: Spreadsheet::ParseXLSX returning zero
by bitingduck (Deacon) on Dec 05, 2023 at 09:31 UTC
    You may have used OpenOffice instead of Excel because some older version of Excel (2008?) was prone to handling dates wrong. That's a different problem that I've run into with Excel in the past and worked around.
      Ah, yes, for the optimist the glass is half full, for the pessimist it's half empty, and for Excel it's January 2nd (or February 1st, depending on locale)...