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

pack-priv final Class PercentRankExcFunction

extends Object
implements FreeRefFunction
Class Inheritance
All Implemented Interfaces
org.apache.poi.ss.formula.functions.FreeRefFunction
Imports
org.apache.poi.ss.formula.OperationEvaluationContext, org.apache.poi.ss.formula.eval.*, org.apache.poi.ss.formula.functions.FreeRefFunction, .PercentRank, java.math.BigDecimal, java.util.ArrayList, .List

Implementation of 'Analysis Toolpak' the Excel function PERCENTRANK.EXC() Syntax:
PERCENTRANK.EXC(array, X, [significance])

array The array or range of data with numeric values that defines relative standing.
X The value for which you want to know the rank.
significance Optional. A value that identifies the number of significant digits for the returned percentage value. If omitted, PERCENTRANK.EXC uses three digits (0.xxx).

Returns a number between 0 and 1 (exclusive) representing a percentage. PERCENTRANK.INC returns value between 0 and 1 (inclusive).

Since
POI 5.1.0
See Also
PercentRank, PercentRankIncFunction

Field Summary

Modifier and TypeField and Description
private ArgumentsEvaluator
public static final FreeRefFunction

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private ValueEval
calculateRank(List<Double> numbers, double x, int significance, boolean recurse)

public ValueEval
evaluate(ValueEval[]
the pre-evaluated arguments for this function. args is never null, nor are any of its elements.
args
,
OperationEvaluationContext
primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.
ec
)

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

private ValueEval
evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

evaluatorback to summary
private ArgumentsEvaluator evaluator
instanceback to summary
public static final FreeRefFunction instance

Constructor Detail

PercentRankExcFunctionback to summary
private PercentRankExcFunction(ArgumentsEvaluator anEvaluator)

Method Detail

calculateRankback to summary
private ValueEval calculateRank(List<Double> numbers, double x, int significance, boolean recurse)
evaluateback to summary
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)

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

Parameters
args:ValueEval[]

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

the pre-evaluated arguments for this function. args is never null, nor are any of its elements.

ec:OperationEvaluationContext

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

primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.

Returns:ValueEval

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

never null. Possibly an instance of ErrorEval in the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).

evaluateback to summary
private ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex)