Top Description Fields Constructors Methods
org.apache.poi.ss.formula.eval

public final Class ErrorEval

extends Object
implements ValueEval
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.eval.ValueEval
Imports
java.util.HashMap, .Map, org.apache.poi.ss.usermodel.FormulaError

Evaluations for formula errors

Field Summary

Modifier and TypeField and Description
private final FormulaError
public static final ErrorEval
public static final ErrorEval
DIV_ZERO

#DIV/0!

private static final Map<FormulaError, ErrorEval>
public static final ErrorEval
public static final ErrorEval
NA

#N/A - Argument or function not available

public static final ErrorEval
public static final ErrorEval
public static final ErrorEval
NUM_ERROR

#NUM!

public static final ErrorEval
public static final ErrorEval

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
public String
public static String

Returns:

the String representation of the specified Excel error code.
getText
(int errorCode)

Converts error codes to text.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static ErrorEval
valueOf(int
An error code listed in FormulaError
errorCode
)

Translates an Excel internal error code into the corresponding POI ErrorEval instance

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_errorback to summary
private final FormulaError _error
CIRCULAR_REF_ERRORback to summary
public static final ErrorEval CIRCULAR_REF_ERROR
DIV_ZEROback to summary
public static final ErrorEval DIV_ZERO

#DIV/0! - Division by zero

evalsback to summary
private static final Map<FormulaError, ErrorEval> evals
FUNCTION_NOT_IMPLEMENTEDback to summary
public static final ErrorEval FUNCTION_NOT_IMPLEMENTED
NAback to summary
public static final ErrorEval NA

#N/A - Argument or function not available

NAME_INVALIDback to summary
public static final ErrorEval NAME_INVALID

#NAME? - Wrong function or range name

NULL_INTERSECTIONback to summary
public static final ErrorEval NULL_INTERSECTION

#NULL! - Intersection of two cell ranges is empty

NUM_ERRORback to summary
public static final ErrorEval NUM_ERROR

#NUM! - Value range overflow

REF_INVALIDback to summary
public static final ErrorEval REF_INVALID

#REF! - Illegal or deleted cell reference

VALUE_INVALIDback to summary
public static final ErrorEval VALUE_INVALID

#VALUE! - Wrong type of operand

Constructor Detail

ErrorEvalback to summary
private ErrorEval(FormulaError error)

Method Detail

getErrorCodeback to summary
public int getErrorCode()
getErrorStringback to summary
public String getErrorString()
getTextback to summary
public static String getText(int errorCode)

Converts error codes to text. Handles non-standard error codes OK. For debug/test purposes (and for formatting error messages).

Returns:String

the String representation of the specified Excel error code.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

valueOfback to summary
public static ErrorEval valueOf(int errorCode)

Translates an Excel internal error code into the corresponding POI ErrorEval instance

Parameters
errorCode:int

An error code listed in FormulaError

Exceptions
IllegalStateException:
If an unknown errorCode is specified