Class Sheet
- java.lang.Object
-
- org.apache.poi.ss.formula.functions.Sheet
-
- All Implemented Interfaces:
FreeRefFunction
public class Sheet extends Object implements FreeRefFunction
Implementation for Excel SHEET() function.Syntax:
SHEET([value])
Returns the sheet number of the referenced sheet or the current sheet if no argument is provided.
Examples:
=SHEET()→ returns the current sheet number (1-based)=SHEET(A1)→ returns the sheet number of the reference A1=SHEET(A1:B5)→ returns the sheet number of the range A1:B5=SHEET("Sheet3")→ returns the sheet number of the sheet named "Sheet3"
-
-
Constructor Summary
Constructors Constructor Description Sheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueEvalevaluate(ValueEval[] args, OperationEvaluationContext ec)
-
-
-
Field Detail
-
instance
public static final Sheet instance
-
-
Method Detail
-
evaluate
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec)
- Specified by:
evaluatein interfaceFreeRefFunction- Parameters:
args- the pre-evaluated arguments for this function. args is nevernull, nor are any of its elements.ec- primarily used to identify the source cell containing the formula being evaluated. may also be used to dynamically create reference evals.- Returns:
- never
null. Possibly an instance ofErrorEvalin the case of a specified Excel error (Exceptions are never thrown to represent Excel errors).
-
-