[Bug 70142] POI 5.2.2 throws a RecordFormatException while opening an XLSX workbook due to the 100,000,000-byte allocation limit enforced by IOUtils.toByteArrayWithMaxLength().
[email protected] Mon, 13 Jul 2026 13:22:15 +0000
| Newsgroups | gmane.comp.jakarta.poi.devel |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bz.apache.org/bugzilla/show_bug.cgi?id=70142 --- Comment #2 from PJ Fanning <[email protected]> --- xlsx files are compressed so the raw file size is a bad indicator of how much memory is needed to parse the data. https://poi.apache.org/security.html https://poi.apache.org/components/configuration.html One option that might be worth checking out is org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.setThresholdBytesForTempFiles(int thresholdBytes) Added in POI 5.1.0. Number of bytes at which a zip entry is regarded as too large for holding in memory and the data is put in a temp file instead - defaults to -1 meaning temp files are not used and that zip entries with more than 2GB of data after decompressing will fail, 0 means all zip entries are stored in temp files. A threshold like 50000000 (approx 50Mb is recommended) -- You are receiving this mail because: You are the assignee for the bug.