I am having an excel file (.xls) of size about 2.3 mb. I need to write data to one of its worksheets.
I am using java to read and write to this excel file and using the api provided by POI (Apache).
There are around 25 tabs in the file each of which contains some text.
However, while doing so, I am getting an exception mentioned below.
It works when I remove the remaining sheets.
Can anyone help me out getting my problem resolved?
The exception which occurs is as below:-
Exception occurred during event dispatching:
-----------------------------------------------------------------
java.lang.ArrayIndexOutOfBoundsException: 49
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate$MyIterator.findNext(ValueRecordsAggregate.java:336)
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate$MyIterator.<init>(ValueRecordsAggregate.java:318)
at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.getRowCellBlockSize(ValueRecordsAggregate.java:201)
at org.apache.poi.hssf.model.Sheet.serializeIndexRecord(Sheet.java:785)
at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:730)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:959)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:897)