doy / spreadsheet-parsexlsx

parse XLSX files
http://metacpan.org/release/Spreadsheet-ParseXLSX
27 stars 35 forks source link

"CRC or size mismatch while skipping data descriptor" when opening spreadsheet #102

Open realflash opened 1 year ago

realflash commented 1 year ago

I wrote some code that parses a monthly list of transactions provided by my card provider. The code works for April's transaction spreadsheet. When I feed it May's spreadsheet (downloaded from the same page on the same website), I get the error

format error: CRC or size mismatch while skipping data descriptor

when calling

$workbook = $parser->parse($file->tempname);

(a line in my code). Archive::Zip is at the current release version of 1.68. This module is at 0.27. If I use Archive::Zip to open the same file directly, no error occurs.

The failing file opens in LibreOffice OK, and unzip -t reports that there are no problems with the "zip" file. If I open the failing file in LibreOffice and save without making changes, the resulting file is parsed correctly.

I can provide both the working April file and the failing May file to someone, but am not going to attach it here.