Top Description Methods
org.apache.poi.ss.formula.functions

public Interface ArrayFunction

Known Direct Implementers
org.apache.poi.ss.formula.functions.BooleanFunction, org.apache.poi.ss.formula.functions.IfFunc, org.apache.poi.ss.formula.functions.LogicalFunction, org.apache.poi.ss.formula.functions.Value, org.apache.poi.ss.formula.atp.XLookupFunction, org.apache.poi.ss.formula.eval.RelationalOperationEval, org.apache.poi.ss.formula.eval.TwoOperandNumericOperation, org.apache.poi.ss.formula.eval.UnaryMinusEval, org.apache.poi.ss.formula.eval.UnaryPlusEval
Imports
org.apache.poi.ss.formula.CacheAreaEval, .FormulaParseException, org.apache.poi.ss.formula.eval.*, java.util.function.BiFunction

Common Interface for any excel built-in function that has implemented array formula functionality.

Method Summary

Modifier and TypeMethod and Description
public static ValueEval
_evaluateOneArrayArg(ValueEval arg0, int srcRowIndex, int srcColumnIndex, Function<ValueEval, ValueEval> evalFunc)

public static ValueEval
_evaluateTwoArrayArgs(ValueEval arg0, ValueEval arg1, int srcRowIndex, int srcColumnIndex, BiFunction<ValueEval, ValueEval, ValueEval> evalFunc)

public ValueEval

Returns:

The evaluated result, possibly an ErrorEval, never null

Note

- Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate to Double#NaN be sure to translate the result to ErrorEval#NUM_ERROR.

evaluateArray
(ValueEval[]
the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval, never null.
args
,
int
row index of the cell containing the formula under evaluation
srcRowIndex
,
int
column index of the cell containing the formula under evaluation
srcColumnIndex
)

public default ValueEval
evaluateOneArrayArg(ValueEval arg0, int srcRowIndex, int srcColumnIndex, Function<ValueEval, ValueEval> evalFunc)

public default ValueEval

Returns:

The evaluated result, possibly an ErrorEval, never null

Note

- Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate to Double#NaN be sure to translate the result to ErrorEval#NUM_ERROR.

evaluateTwoArrayArgs
(ValueEval
the first function argument. Empty values are represented with BlankEval or MissingArgEval, never null
arg0
,
ValueEval
the first function argument. Empty values are represented with BlankEval or MissingArgEval, never null
arg1
,
int
row index of the cell containing the formula under evaluation
srcRowIndex
,
int
column index of the cell containing the formula under evaluation
srcColumnIndex
,
BiFunction<ValueEval, ValueEval, ValueEval> evalFunc)

Evaluate an array function with two arguments.

Method Detail

_evaluateOneArrayArgback to summary
public static ValueEval _evaluateOneArrayArg(ValueEval arg0, int srcRowIndex, int srcColumnIndex, Function<ValueEval, ValueEval> evalFunc)
_evaluateTwoArrayArgsback to summary
public static ValueEval _evaluateTwoArrayArgs(ValueEval arg0, ValueEval arg1, int srcRowIndex, int srcColumnIndex, BiFunction<ValueEval, ValueEval, ValueEval> evalFunc)
evaluateArrayback to summary
public ValueEval evaluateArray(ValueEval[] args, int srcRowIndex, int srcColumnIndex)
Parameters
args:ValueEval[]

the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval, never null.

srcRowIndex:int

row index of the cell containing the formula under evaluation

srcColumnIndex:int

column index of the cell containing the formula under evaluation

Returns:ValueEval

The evaluated result, possibly an ErrorEval, never null

Note

- Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate to Double#NaN be sure to translate the result to ErrorEval#NUM_ERROR.

evaluateOneArrayArgback to summary
public default ValueEval evaluateOneArrayArg(ValueEval arg0, int srcRowIndex, int srcColumnIndex, Function<ValueEval, ValueEval> evalFunc)
evaluateTwoArrayArgsback to summary
public default ValueEval evaluateTwoArrayArgs(ValueEval arg0, ValueEval arg1, int srcRowIndex, int srcColumnIndex, BiFunction<ValueEval, ValueEval, ValueEval> evalFunc)

Evaluate an array function with two arguments.

Parameters
arg0:ValueEval

the first function argument. Empty values are represented with BlankEval or MissingArgEval, never null

arg1:ValueEval

the first function argument. Empty values are represented with BlankEval or MissingArgEval, never null

srcRowIndex:int

row index of the cell containing the formula under evaluation

srcColumnIndex:int

column index of the cell containing the formula under evaluation

Returns:ValueEval

The evaluated result, possibly an ErrorEval, never null

Note

- Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate to Double#NaN be sure to translate the result to ErrorEval#NUM_ERROR.