Bug 62704

Summary: getting java.lang.ArrayIndexOutOfBoundsException
Product: POI Reporter: Mark Giordano <mgiordano>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED CLOSED    
Severity: normal    
Priority: P2    
Version: 4.0.0-FINAL   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Mark Giordano 2018-09-11 13:44:59 UTC
We downloaded the latest version of poi-4.0.0 and are running that in conjunction with java 8.0.  We previously used the hssfFormulaEvaluator(book); in our program when we were running poi 3.17 with java 5.0 32 bit.  Everything worked.  When we try to run now this is the only problem we seem to have.

It was suggested this could be a bug.  thank you.

Message . . . . :   Java exception received when calling Java method.         
Cause . . . . . :   RPG procedure RATSUPXLS in program JAMAICA/RATSUPXLS      
  received Java exception "java.lang.ArrayIndexOutOfBoundsException: Array    
  index out of range: -2" when calling method "evaluateAllFormulaCells" with  
  signature "(Lorg.apache.poi.hssf.usermodel.HSSFWorkbook;)V" in class        
  "org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator".
Comment 1 Nick Burch 2018-09-11 14:06:46 UTC
If you temporarily switch from doing evaluate all, and instead loop over all the sheets then rows then cells yourself to evaluate each one individually, can you identify what the problematic formula is that triggers the bug?

And/or can you upload the excel file you're using to trigger the exception?
Comment 2 PJ Fanning 2021-10-10 16:04:52 UTC
no test case provided - reopen if you can provide one