Skip to content

AddWorkbookOptions

optional assumeArrayFormulas?: boolean;

Whether formulas should be assumed to be of array type even if not accompanied by an F property. Set this to true in tests specs, unless specifically testing implicit intersection and the like.

false
WorkbookOptions.assumeArrayFormulas

optional extractExpressions?: boolean;

Try to extract repeated expressions; default true


optional filename?: string;

Filename to associate with the workbook. Used by fromXLSX methods when loading from binary data, since the filename cannot be inferred. Should not include path, just filename with extension.

WorkbookOptions.filename

optional isExternal?: boolean;

Whether this workbook was loaded as an external reference from another workbook. External workbooks can be replaced by “real” workbooks with the same name.

false
WorkbookOptions.isExternal

optional iterativeCalculation?: IterativeCalculationOptions;

Settings for iterative calculations (nullish to disable; that’s the default)

WorkbookOptions.iterativeCalculation

optional mode?: WorkbookMode;

Spreadsheet-engine compatibility mode, governing formula evaluation and other behaviors that differ between Excel, Google Sheets, and Grid Sheets (e.g. coercion of formula results, number-format propagation, spill extents). Defaults to the mode mapped from the workbook’s source format (XLSX → Excel, etc.), falling back to MODE_GRID_SHEET when no mapping applies.

WorkbookOptions.mode

optional readOnly?: boolean;

When true, skip formula validation and the initial-recalc scheduling during workbook construction. Useful when loading a workbook only to inspect its structure (saved values stay as-is) without paying the recalc cost. Defaults to false.

WorkbookOptions.readOnly

optional recalcAll?: boolean;

Whether to recalculate every formula cell on init.

If unset, defaults to true when the workbook’s calculationProperties.fullCalcOnLoad is true and its calcMode is not "manual", mirroring the OOXML <calcPr fullCalcOnLoad="1"/> semantics of ECMA-376 §18.2.2. Setting it explicitly overrides what the file says, in either direction.

When effective, this runs an ALL_FORMULA_CELLS recalc over every workbook in the model, not just the one being attached --- stronger than recalcVolatiles or recalcErrors. Such a recalc evaluates even deferred data-table cells, so a workbook with both calcMode: "autoNoTable" and fullCalcOnLoad has its data tables evaluated once at load, as in Excel; Model.deferDataTables still applies to later recalculations.


optional recalcErrors?: boolean;

Whether to recalculate cells with error values on init. Assumed true if not specified.


optional recalcVolatiles?: boolean;

Whether to recalculate volatile cells on init. Assumed true if not specified.