Example usage for org.apache.poi.ss.formula.eval ErrorEval NUM_ERROR

List of usage examples for org.apache.poi.ss.formula.eval ErrorEval NUM_ERROR

Introduction

In this page you can find the example usage for org.apache.poi.ss.formula.eval ErrorEval NUM_ERROR.

Prototype

ErrorEval NUM_ERROR

To view the source code for org.apache.poi.ss.formula.eval ErrorEval NUM_ERROR.

Click Source Link

Document

#NUM! - Value range overflow

Usage

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);
    }
}