Hello all!

I have found an error in POI when evaluating formulas. Unfortunately I haven't got time to package all necessary diffs to submit a patch, to be honest I'm not even familiar with JUnit testing framework, but I think someone in community could pay his attention to this error and
include the fix in source tree by chance:

In Excel some logical functions allow empty operands, so that OR(TRUE;) or AND(FALSE;) are both valid constructions.
    At the time POI throws the following exception on this:

java.lang.RuntimeException: Unexpected eval (org.apache.poi.hssf.record.formula.eval.MissingArgEval):java.lang.RuntimeException: Unexpected eval (org.apache.poi.hssf.record.formula.eval.MissingArgEval)

to get the things right we need to add the following code to org.apache.poi.hssf.record.formula.eval.OperandResolver.coerceValueToBoolean

                if (ve instanceof MissingArgEval) {
                        return Boolean.FALSE;
                }

I hope this could save a day for someone.

Best regards,
Dmitri


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

Reply via email to