I am facing an issue when trying to open and read an xlsx file size of around 100MB, 650k rows and about a total of 10,400,000 cells count.
This is the issue i get:
org.apache.poi.util.RecordFormatException: Tried to read data but the maximum length for this record type is 100,000,000.
If the file is not corrupt and not large, please open an issue on bugzilla to request
increasing the maximum allowable size for this record type.
You can set a higher override value with IOUtils.setByteArrayMaxOverride()
It hit error on this code:
FileInputStream fis = new FileInputStream(file);
XSSFWorkbook newWorkbook = new XSSFWorkbook(fis);
I tried using InputStream instead of FileInputStream, same issue. And if i add
IOUtils.setByteArrayMaxOverride(1000000000);
I get the java heap space error:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
My eclipse.ini settings already at max 2GB heap space (-Xms256m -Xmx2048m). Are there anything that i can do to read more than the maximum length ?