From 7efdb2054a83c196fdfb972c96868b61cd475315 Mon Sep 17 00:00:00 2001 From: Marten Deinum Date: Mon, 2 Oct 2023 16:02:20 +0200 Subject: [PATCH] Update README.adoc Include a FAQ section for commonly asked questions. Closes: #97 --- spring-batch-excel/README.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-batch-excel/README.adoc b/spring-batch-excel/README.adoc index 6eb8906..acbc791 100644 --- a/spring-batch-excel/README.adoc +++ b/spring-batch-excel/README.adoc @@ -124,3 +124,16 @@ Uses a `BeanWrapper` to convert a given row into an object. Uses the column name ---- + +== Frequently Asked Questions + +=== Not able to open large Excel +When opening large Excel files or Excel files with large amounts of data in a single cell it might fail with an error + +``` +"Unexpected error Tried to allocate an array of length 162,386,364, 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. As a temporary workaround, consider setting a higher override value with IOUtils.setByteArrayMaxOverride()" +``` + +This is due to the maximum lenght for certain datatypes is limited. To prevent this from happening you can use the `IOUtils.setByteArrayMaxOverride()` method to increase the allowed size. It is however important that this is set before anything POI related has been processed/configured. + +Ideally, when using Spring Boot, you can set this before launching the application or by putting this in a `static {}` initializer block of the Spring Batch job configuration.