Everything a formula function is allowed to know about the world outside its arguments.
Remarks
Formula functions are pure — they cannot reach the workbook, the sheet they sit on, or
the clock. FormulaContext is the one channel that gives them sheet data, cell
coordinates, date and number parsing, and evaluation hints without giving up that purity.
Import it and call its methods directly; there is nothing to construct or thread through
arguments. Every call is already scoped to the cell being evaluated:
The calculation engine provides the implementation. Third-party code (UDF packages, test
harnesses) may supply its own for isolated evaluation or unit testing.
Everything a formula function is allowed to know about the world outside its arguments.
Remarks
Formula functions are pure — they cannot reach the workbook, the sheet they sit on, or the clock.
FormulaContextis the one channel that gives them sheet data, cell coordinates, date and number parsing, and evaluation hints without giving up that purity.Import it and call its methods directly; there is nothing to construct or thread through arguments. Every call is already scoped to the cell being evaluated:
Capabilities
markVolatile,getRow,getColumn,getEntireCoords,getRandomgetArgsformatResultscreateRange,flattenAreas,filterHiddengetReference,getValueAt,getFormulaAt,getSpillAtgetFunctiongetNow,toSerialDate,fromSerialDate,getDateParts,getSerialDate,parseAsDate,parseAsSerialDate,isValidDateparseAsNumber,parseAsLiteral,toText,comparecreateCriteriagetSheetCount,getSheetIndex,getAddress,getNumberFormatImplementors
The calculation engine provides the implementation. Third-party code (UDF packages, test harnesses) may supply its own for isolated evaluation or unit testing.
See
Interface
IFormulaContext