List of usage examples for org.apache.poi.ss.formula.eval ErrorEval NUM_ERROR
ErrorEval NUM_ERROR
To view the source code for org.apache.poi.ss.formula.eval ErrorEval NUM_ERROR.
Click Source Link
From source file:com.iesvirgendelcarmen.acceso.tema01.CalculateMortgage.java
License:Apache License
/** * Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases * * @throws EvaluationException (#NUM!) if <tt>result</tt> is <tt>NaN</> or <tt>Infinity</tt> *///w ww. j a va2 s . com private void checkValue(double result) throws EvaluationException { if (Double.isNaN(result) || Double.isInfinite(result)) { throw new EvaluationException(ErrorEval.NUM_ERROR); } }