SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Namespace IFormulaContext

    Everything a formula function is allowed to know about the world outside its arguments.

    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:

    import { FormulaContext } from '@sheetxl/primitives';

    export function ROWNUMBER(): number {
    return FormulaContext.getRow() + 1;
    }
    Category Key methods
    Evaluation lifecycle markVolatile, getRow, getColumn, getEntireCoords, getRandom
    Argument reflection getArgs
    Output hints formatResults
    Range construction createRange, flattenAreas, filterHidden
    Dynamic references getReference, getValueAt, getFormulaAt, getSpillAt
    Function lookup getFunction
    Dates getNow, toSerialDate, fromSerialDate, getDateParts, getSerialDate, parseAsDate, parseAsSerialDate, isValidDate
    Coercion parseAsNumber, parseAsLiteral, toText, compare
    Criteria createCriteria
    Sheet introspection getSheetCount, getSheetIndex, getAddress, getNumberFormat

    The calculation engine provides the implementation. Third-party code (UDF packages, test harnesses) may supply its own for isolated evaluation or unit testing.

    IFormulaContext

    CriteriaOptions
    DateParts
    FilterHiddenOptions
    ParseNumberOptions
    CriteriaEvaluator