https://issues.apache.org/bugzilla/show_bug.cgi?id=54436

Yegor Kozlov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Yegor Kozlov <[email protected]> ---
Patch applied in r1451875

The metadata is fixed but you still be getting exceptions because GETPIVOTDATA
is not implemented in current version of POI. If you need to evaluate workbooks
with this function you need to implement it and register via
WorkbookEvaluator#registerFunction, see
http://poi.apache.org/spreadsheet/eval-devguide.html

I could not reproduce the problem with the test from the attached archive. The
code throws a exception but a different one:

java.lang.IllegalArgumentException: firstMovedIndex, lastMovedIndex out of
order
    at org.apache.poi.ss.formula.FormulaShifter.<init>(FormulaShifter.java:56)
    at
org.apache.poi.ss.formula.FormulaShifter.createForRowShift(FormulaShifter.java:81)
    at org.apache.poi.xssf.usermodel.XSSFSheet.shiftRows(XSSFSheet.java:2361)

I confirmed it with POI-3.9 and trunk. 

The simplest test for this fix is to evaluate all formulas in the workbook:

 workbook.getCreationHelper().createFormulaEvaluator().evaluateAll();

Without this fix it fails with ArrayIndexOutOfBoundsException and with the
patch applied it passes OK. 

Regards,
Yegor

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to