the data
Optional options: Partial<CellFormulaOptionsIf> & { own functions
and limits; now/random for tests
Readonly optionsThe new formula texts after rows or columns were inserted or deleted (or cells moved) – the caller writes them (the engine only reads the data). Cells are given at their position after the edit.
what changed
changed formula texts
Evaluates a formula once (not stored), e.g. for a formula bar preview.
the formula ("=SUM(D2:D4)", the = is optional)
Optional at: readonly [number, number]the cell it is evaluated in (for [field])
the result
engine.evaluate("=SUM(D2:D4)"); // 3895
The value of a cell: the result of its formula or its data value (Date for dates, a FormulaError for an
error, '=… without the quote).
physical row (0-based)
column (0-based)
the value
The inputs of cells changed (written by the table): formulas are compiled again, the dependent cells recalculated.
physical row and column of each changed cell
what was recalculated
Reads all inputs again and calculates every formula (start, setRows, other columns).
what was calculated
Recalculates the volatile formulas (TODAY, NOW, RAND) and their dependents.
what was recalculated
Static fromAn engine over a 2-D array (rows of cells) – without a table.
the cells; formula texts start with =
Optional options: Partial<CellFormulaOptionsIf>own functions and limits
the engine, already calculated
SheetEngine.fromArrays([[1, 2, "=A1+B1"]]).getValue(0, 2); // 3
The spreadsheet engine of cell formulas (DOM-free): compiles the formula texts of the data (
"=SUM(D2:D4)"), keeps a dependency graph (single cells and range nodes) and recalculates only the dependent cells after a change – in topological order (Kahn), cycles (Tarjan) become#CIRC!. Noeval, nonew Function. Volatile functions (TODAY,NOW,RAND,RANDBETWEEN) are recomputed on every recalculation.Example
Since
1.1.99