Use the default engine for standard formulas or select the full engine for analysis functions.On this page
Loading documentation…
Compare the builds
Build
Package
Choose it for
Default
@sheetwrite/wasm
Standard math, lookup, text, logic, dates, dynamic arrays, and LET; the smallest download.
Full
@sheetwrite/formulas
Analysis families, LAMBDA helpers, GROUPBY, and PIVOTBY.
Both builds use the same Rust calculation engine, storage model, and resource
limits. The full build adds statistics, distributions, regression, finance,
regex, database, matrix, and reshaping functions. Check the
function catalog for the build that
provides each function. Compare download sizes in the
engine measurements.
Run this before creating any grid or store and before mounting a framework
adapter. Later zero-argument calls keep the selected engine. Importing the
package alone does not select it.
Selection rules
An app uses one engine. Once initialization starts, selecting another engine rejects.
The default build returns #NAME? for full-only functions and does not suggest them in formula assist. Their source remains in the document.
Repeated initialization with the selected engine is safe. Concurrent calls share initialization; a failed initialization can be retried.
Renderer choice is separate. Both builds work with canvas painting or worker rendering.
See also
Installation for explicit WASM sources and framework setup.
function initSheetwrite(source?: BufferSource | URL | string | Request | WebAssembly.Module, engine?: SheetwriteEngine): Promise<void>functioninitSheetwrite(source?:BufferSource|URL|string|Request|WebAssembly.Module,engine?:SheetwriteEngine,):Promise<void>functioninitSheetwrite(source?:|BufferSource|URL|string|Request|WebAssembly.Module,engine?:SheetwriteEngine,):Promise<void>Load one WASM engine before createGrid. The default is @sheetwrite/wasm. Pass the @sheetwrite/formulas module as the second argument to select the full engine.Exampleimport { initSheetwrite } from"@sheetwrite/core";import*as formulas from"@sheetwrite/formulas";awaitinitSheetwrite(undefined, formulas);See also/docs/start/choose-an-engine/See alsocreateGridAPI reference →var undefinedvar undefinedvar undefined