Class PercentRank
java.lang.Object
org.apache.poi.ss.formula.functions.PercentRank
- All Implemented Interfaces:
Function
Implementation of 'the Excel function PERCENTRANK()
Syntax:
PERCENTRANK(array, X, [significance])
PERCENTRANK(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 uses three digits (0.xxx).
Returns a number between 0 and 1 representing a percentage.
- Since:
- POI 5.1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic NumberEvalinterpolate(double x, double closestMatchBelow, double closestMatchAbove, NumberEval belowRank, NumberEval aboveRank, int significance) static doubleround(BigDecimal bd, int significance)
-
Field Details
-
instance
-
-
Method Details
-
evaluate
- Specified by:
evaluatein interfaceFunction- Parameters:
args- the evaluated function arguments. Empty values are represented withBlankEvalorMissingArgEval, nevernull.srcRowIndex- row index of the cell containing the formula under evaluationsrcColumnIndex- column index of the cell containing the formula under evaluation- Returns:
- The evaluated result, possibly an
ErrorEval, nevernull. Note - Excel uses the error code #NUM! instead of IEEE NaN, so when numeric functions evaluate toDouble.NaNbe sure to translate the result toErrorEval.NUM_ERROR.
-
interpolate
@Internal public static NumberEval interpolate(double x, double closestMatchBelow, double closestMatchAbove, NumberEval belowRank, NumberEval aboveRank, int significance) -
round
-
getValues
@Internal public static List<ValueEval> getValues(ValueEval eval, int srcRowIndex, int srcColumnIndex) throws EvaluationException - Throws:
EvaluationException
-