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

public Interface FreeRefFunction

Known Direct Implementers
org.apache.poi.ss.formula.functions.Dec2Bin, org.apache.poi.ss.formula.functions.NormSInv, org.apache.poi.ss.formula.functions.Single, org.apache.poi.ss.formula.functions.Gcd, org.apache.poi.ss.formula.functions.Hex2Dec, org.apache.poi.ss.formula.functions.Imaginary, org.apache.poi.ss.formula.functions.ImReal, org.apache.poi.ss.formula.functions.Indirect, org.apache.poi.ss.formula.functions.Lcm, org.apache.poi.ss.formula.functions.NormDist, org.apache.poi.ss.formula.functions.NormInv, org.apache.poi.ss.formula.functions.NormSDist, org.apache.poi.ss.formula.functions.NumberValueFunction, org.apache.poi.ss.formula.functions.Oct2Dec, org.apache.poi.ss.formula.functions.Poisson, org.apache.poi.ss.formula.functions.Quotient, org.apache.poi.ss.formula.functions.Sqrtpi, org.apache.poi.ss.formula.functions.Standardize, org.apache.poi.ss.formula.functions.TDist, org.apache.poi.ss.formula.functions.TDist2t, org.apache.poi.ss.formula.functions.TDistLt, org.apache.poi.ss.formula.functions.TDistRt, org.apache.poi.ss.formula.functions.WeekNum, org.apache.poi.ss.formula.UserDefinedFunction, org.apache.poi.ss.formula.atp.AnalysisToolPak.NotImplemented, org.apache.poi.ss.formula.atp.IfError, org.apache.poi.ss.formula.atp.IfNa, org.apache.poi.ss.formula.atp.Ifs, org.apache.poi.ss.formula.atp.MRound, org.apache.poi.ss.formula.atp.NetworkdaysFunction, org.apache.poi.ss.formula.atp.ParityFunction, org.apache.poi.ss.formula.atp.PercentRankExcFunction, org.apache.poi.ss.formula.atp.PercentRankIncFunction, org.apache.poi.ss.formula.atp.RandBetween, org.apache.poi.ss.formula.atp.Stdevp, org.apache.poi.ss.formula.atp.Stdevs, org.apache.poi.ss.formula.atp.Switch, org.apache.poi.ss.formula.atp.TextJoinFunction, org.apache.poi.ss.formula.atp.Varp, org.apache.poi.ss.formula.atp.Vars, org.apache.poi.ss.formula.atp.WorkdayFunction, org.apache.poi.ss.formula.atp.WorkdayIntlFunction, org.apache.poi.ss.formula.atp.XLookupFunction, org.apache.poi.ss.formula.atp.XMatchFunction, org.apache.poi.ss.formula.atp.YearFrac, org.apache.poi.ss.formula.functions.Baseifs, org.apache.poi.ss.formula.functions.BesselJ, org.apache.poi.ss.formula.functions.Bin2Dec, org.apache.poi.ss.formula.functions.CeilingMath, org.apache.poi.ss.formula.functions.CeilingPrecise, org.apache.poi.ss.formula.functions.Complex, org.apache.poi.ss.formula.functions.Covar, org.apache.poi.ss.formula.functions.Days, org.apache.poi.ss.formula.functions.Dec2Hex, org.apache.poi.ss.formula.functions.Delta, org.apache.poi.ss.formula.functions.DollarDe, org.apache.poi.ss.formula.functions.DollarFr, org.apache.poi.ss.formula.functions.EDate, org.apache.poi.ss.formula.functions.EOMonth, org.apache.poi.ss.formula.functions.FactDouble, org.apache.poi.ss.formula.functions.FloorMath, org.apache.poi.ss.formula.functions.FloorPrecise, org.apache.poi.ss.formula.functions.Forecast
Imports
org.apache.poi.ss.formula.eval.ValueEval, org.apache.poi.ss.formula.OperationEvaluationContext

For most Excel functions, involving references ((cell, area), (2d, 3d)), the references are passed in as arguments, and the exact location remains fixed. However, a select few Excel functions have the ability to access cells that were not part of any reference passed as an argument.
Two important functions with this feature are INDIRECT and OFFSET

When POI evaluates formulas, each reference argument is capable of evaluating any cell inside its range. Actually, even cells outside the reference range but on the same sheet can be evaluated. This allows OFFSET to be implemented like most other functions - taking only the arguments, and source cell coordinates. For the moment this interface only exists to serve the INDIRECT which can decode arbitrary text into cell references, and evaluate them..

Method Summary

Modifier and TypeMethod and Description
public ValueEval

Returns:

never null. Possibly an instance of ErrorEval in the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).
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
)

Method Detail

evaluateback to summary
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)
Parameters
args:ValueEval[]

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

ec:OperationEvaluationContext

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

Returns:ValueEval

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