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

public final Class Counta

extends Object
implements Function
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.functions.Function
Imports
org.apache.poi.ss.formula.TwoDEval, org.apache.poi.ss.formula.eval.BlankEval, .ErrorEval, .NumberEval, .ValueEval, org.apache.poi.ss.formula.functions.CountUtils.I_MatchPredicate, .CountUtils.I_MatchAreaPredicate

Counts the number of cells that contain data within the list of arguments. Excel Syntax COUNTA(value1,value2,...) Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be counted.

Field Summary

Modifier and TypeField and Description
private final CountUtils.I_MatchPredicate
private static final CountUtils.I_MatchPredicate
private static final CountUtils.I_MatchPredicate
private static final CountUtils.I_MatchPredicate

Constructor Summary

AccessConstructor and Description
public
private
Counta(CountUtils.I_MatchPredicate criteriaPredicate)

Method Summary

Modifier and TypeMethod and Description
public ValueEval
evaluate(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
srcCellRow
,
int
column index of the cell containing the formula under evaluation
srcCellCol
)

Implements org.apache.poi.ss.formula.functions.Function.evaluate.

public static Counta
subtotalInstance(boolean includeHiddenRows)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_predicateback to summary
private final CountUtils.I_MatchPredicate _predicate
defaultPredicateback to summary
private static final CountUtils.I_MatchPredicate defaultPredicate
subtotalPredicateback to summary
private static final CountUtils.I_MatchPredicate subtotalPredicate
subtotalVisibleOnlyPredicateback to summary
private static final CountUtils.I_MatchPredicate subtotalVisibleOnlyPredicate

Constructor Detail

Countaback to summary
public Counta()
Countaback to summary
private Counta(CountUtils.I_MatchPredicate criteriaPredicate)

Method Detail

evaluateback to summary
public ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol)

Implements org.apache.poi.ss.formula.functions.Function.evaluate.

Parameters
args:ValueEval[]

Doc from org.apache.poi.ss.formula.functions.Function.evaluate.

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

srcCellRow:int

Doc from org.apache.poi.ss.formula.functions.Function.evaluate.

row index of the cell containing the formula under evaluation

srcCellCol:int

Doc from org.apache.poi.ss.formula.functions.Function.evaluate.

column index of the cell containing the formula under evaluation

Returns:ValueEval

Doc from org.apache.poi.ss.formula.functions.Function.evaluate.

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.

subtotalInstanceback to summary
public static Counta subtotalInstance(boolean includeHiddenRows)