Skip to content
Spreadsheet Engine

WorkbookOptions

type WorkbookOptions = object;
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.


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

iterativeCalculation?: IterativeCalculationOptions;

Overrides the iterative calculation settings stored in the workbook. When omitted, uses the stored settings instead of disabling iteration.


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 type ('excel' → Excel, 'google-sheets' → Google Sheets), falling back to MODE_GRID_SHEET when no mapping applies. An XLSX load settles that type from the file’s originating application, so it is not always 'excel'.


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.


recalcUntrusted?: boolean;

Whether to recalculate on load the formula cells of a Google Sheets export whose saved value is "" or an error name. Such an export saves a blank result like "", and an error like text naming it, so only the formula can tell them apart.

true