Sponsored Links
Sponsored Link

sponsored links

Collapse

Announcement

Collapse
No announcement yet.

HSSF / POI evaluateAllFormulaCells not working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • HSSF / POI evaluateAllFormulaCells not working

    we just recently upgraded to V7R3 and the HSSFFormulaEvaluator is not working. getting
    Message . . . . : Java exception received when calling Java method.
    Cause . . . . . : RPG procedure RATSUPXLS2 in program JAMAICA/RATSUPXLS2
    received Java exception "java.lang.ArrayIndexOutOfBoundsException: Array
    index out of range: -3" when calling method "evaluateAllFormulaCells" with
    signature "(Lorg.apache.poi.hssf.usermodel.HSSFWorkbookV" in class
    "org.apache.poi.hssf.usermodel.HSSFFormulaEvaluato r".

    I'm opening up a .xls spreadsheet that has existing formulas in it. creating / updating other cells in the spreadsheet.
    this did work using jdk60, now we have to use jdk70 or jdk80. I tried both and getting the same error message
    We contacted the POI community and they suggested using the 'evaluateFormulaCell' method but I'm getting

    Message . . . . : Java exception received when calling Java method.
    Cause . . . . . : RPG procedure RATSUPXLS2 in program JAMAICA/RATSUPXLS2
    received Java exception "java.lang.NoSuchMethodError:
    org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.evaluateFormulaCell("
    when calling method "evaluateFormulaCell" with signature
    "(Lorg.apache.poi.hssf.usermodel.HSSFCellV" in class
    "org.apache.poi.hssf.usermodel.HSSFFormulaEvaluato r".

    this is my code to call this
    D HSSFFormulaEvaluator_cell...
    D PR ExtProc( *Java
    D : 'org.apache.poi.hssf-
    D .usermodel.HSSFFormulaEvaluator'
    D : 'evaluateFormulaCell')
    D static
    D cellx like(HSSFCell)

    any ideas on how this can be fixed ??



  • #2
    I haven't used this method... but the error is "No Such Method", which means it can't find a method with the name/signature that you've provided.

    Have you verified that the package name, class name, and method name are correct? Have you compared the signature in the error message with the signature in the actual class?

    Also, when you post stuff like this, please put [code] before it, and [/code] after it. If you look back at your message, you'll see that the signature has been converted to a "winking smiley" emoji, which makes it hard to know what the signature actually is. If you use the code tags, that'll prevent it from interpreting your text with emojis (and other things).

    Comment

    sponsored links

    Collapse

    Working...
    X