【随手记录】POI报错:Tried to allocate an array of length 155,336,359, but the maximum length for this record type is 100,000,000.
POI操作大excel时候报错:
Tried to allocate an array of length 155,336,359, but the maximum length for this record type is 100,000,000. If the file is not corrupt or large, please open an issue on bugzilla to request increasing the maximum allowable size for this record type.
由于excel过大,超出POI设定的默认最大值,可以通过以下代码修改最值:
import org.apache.poi.util.IOUtils; IOUtils.setByteArrayMaxOverride(200000000);