IndexOutOfBoundsException in StandardFormulaProcessor
See original GitHub issueI use a snapshot build including #73 with activated exception throwing. A testcase fails:
AreaRef formulaTargetAreaRef = formulaCellData.getTargetParentAreaRef().get(i);
Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.jxls.formula.StandardFormulaProcessor.processAreaFormulas(StandardFormulaProcessor.java:63)
at org.jxls.area.XlsArea.processFormulas(XlsArea.java:571)
at org.jxls.util.JxlsHelper.processTemplate(JxlsHelper.java:273)
@leonate Can you fix this without a testcase? I can’t publish a testcase for this ugly complex report. But I can test it with our testcase from your feature branch.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
IndexOutOfBoundsException in StandardFormulaProcessor
IndexOutOfBoundsException in StandardFormulaProcessor. Issue #207 resolved. Marcus Warm created an issue 2020-02-21.
Read more >Why do I get IndexOutOfBoundsException - Stack Overflow
The exercise question: Create the method lengths that gets a list of String variables as a parameter and returns an ArrayList that contains...
Read more >Version History - JXLS - - SourceForge
POI 4.0 requires Java 8 and so it is the recommended version to use. JXLS code base will be migrated to Java 8...
Read more >jxls - bytemeta
IndexOutOfBoundsException in StandardFormulaProcessor · Tables Render Issue if they are of different number of columns · Exception when creating report 2nd time.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@leonate I have tested the last codes, and I found that rows between commands still lost. After I debugged the codes, I found that line 178 in XlsArea.java:
transformStaticCells(cellRef, context, startRow, 0, startRow, startCol - 1);
should change to
transformStaticCells(cellRef, context, lastProcessedRow, 0, startRow, size.getWidth() - 1);
I am not sure whether it is a perfect solution for this issue. Hope it helps. Thanks.
Can you share more data variables from the 1st call to transformStaticCells() at
XlsArea.applyAt(CellRef, Context) line: 178
? I suspect this call should not have happened, so perhaps the condition has to be fixed.