diff --git a/src/java/org/apache/poi/hssf/model/FormulaParser.java b/src/java/org/apache/poi/hssf/model/FormulaParser.java index 54fe74253..4361ef50d 100644 --- a/src/java/org/apache/poi/hssf/model/FormulaParser.java +++ b/src/java/org/apache/poi/hssf/model/FormulaParser.java @@ -737,17 +737,18 @@ end; } private void setParameterRVA(Node n, int formulaType) { - Ptg p = (Ptg) n.getValue(); + Ptg p = n.getValue(); + int numOperands = n.getNumChildren(); if (p instanceof AbstractFunctionPtg) { - int numOperands = n.getNumChildren(); - for (int i =0;i