read-excel-file
read-excel-file copied to clipboard
Specific file created with LibreOffice causes 'JavaScript heap out of memory' error
We use this package to read and parse relatively small xlsx files containing user records.
For a specific file from a customer, calling readXlsxFile causes the process to crash with the following error -
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
We know that the file was created (or at least opened and saved) in LibreOffice but are unable to diagnose any issues with it. Reducing the row count has no effect. It is reproducible with the file below containing just a single row. Blank Sheet.xlsx (11.3 KB)
Snippet to reproduce the crash with [email protected] -
const readXlsxFile = require('read-excel-file/node');
const filePath = 'Blank Sheet.xlsx';
readXlsxFile(filePath).then((rows) => {
console.log('rows: ', JSON.stringify(rows));
}).catch((error) => {
console.log('error: ', error);
});
Cool, thx. I won't be looking into the issue though.