activeContent? |
"block" | "keep" |
ActiveX controls and embedded objects: keep them (default), or refuse such files. |
EditorOptions.activeContent |
createWorker? |
() => Worker |
Creates the worker that holds the workbook; defaults to the bundled worker file. |
EditorOptions.createWorker |
csvExport? |
CsvOptions |
How the sheet is written when downloaded as CSV: the delimiter, and whether formulas are escaped (they are by default). |
EditorOptions.csvExport |
customLists? |
string[][] |
Lists that dragging the fill handle and AutoFill continue, as Excel’s custom lists do, after the built-in day and month names: each list is its entries in order, e.g. [[‘North’, ‘East’, ‘South’, ‘West’]]. Users can add their own in the Custom Lists dialog. |
EditorOptions.customLists |
diagnostics? |
boolean |
Show in the status bar which engine is calculating, how large it is, and how long opening, calculating and the last edit took, for comparing engines. |
EditorOptions.diagnostics |
drafts? |
boolean |
Keep unsaved edits in the browser and offer them back when the same file is reopened. Default true. |
EditorOptions.drafts |
features? |
Partial<EditorFeatures> |
Parts of the UI to show; hosts that open and save files themselves can hide them. |
EditorOptions.features |
file? |
| WorkbookFile | null |
The workbook to open, once the editor is made and again whenever it’s a different file (another name or other bytes; a new object for the same file isn’t). Over unsaved changes the user is asked first, and the workbook they keep stays open. A file that can’t be opened says why in the editor. Leave it out to open files yourself with open(). |
- |
icons? |
Partial<Record< | "formula" | "chart" | "image" | "shape" | "undo" | "redo" | "download" | "open" | "info" | "warn" | "close" | "check" | "lock" | "sheet" | "edit" | "eye" | "plus" | "minus" | "schema" | "upload" | "sparkle" | "trash" | "note" | "link" | "keyboard" | "more" | "bold" | "italic" | "underline" | "strike" | "textColor" | "fillColor" | "borders" | "alignLeft" | "alignCenter" | "alignRight" | "wrap" | "checkbox" | "decimalsMore" | "decimalsFewer" | "clearFormat" | "chevronDown" | "chevronUp" | "alignTop" | "alignMiddle" | "alignBottom" | "indentMore" | "indentLess", ReactNode>> |
Replacement icons by name: SVG path data on a 24×24 grid, or (for React hosts) an element. |
EditorOptions.icons |
language? |
string |
Language of the editor’s own text, such as “de” or “fr-CA”; defaults to the locale. English and German are built in; others need translations. |
EditorOptions.language |
limits? |
PackageLimits & object |
Size and complexity limits for opened files; see OpenOptions. |
EditorOptions.limits |
links? |
"off" | "follow" |
Following hyperlinks. ‘follow’ (the default): Ctrl+click (⌘-click on a Mac), Ctrl+Enter (⌘Enter) or the cell menu goes to a place in the workbook, or opens a web page or email in a new tab, asking first the first time for each address; links to anything else are refused. ‘off’: links are shown and can be edited, but never followed. |
EditorOptions.links |
locale? |
string |
Locale for parsing and showing dates and numbers; defaults to the browser’s. |
EditorOptions.locale |
macros? |
"block" | "keep" | "remove" |
Macros (VBA or Excel 4.0 macro sheets): keep them (default), remove them when saving, or refuse such files. |
EditorOptions.macros |
numbers? |
NumberOptions |
Default number display; a matching schema can override it. |
EditorOptions.numbers |
onError? |
(error) => void |
Called when the editor stops working: its worker couldn’t load, crashed, ran out of memory or stopped answering. The editor shows what happened and offers to reopen the file, which brings back unsaved edits when drafts are on. |
EditorOptions.onError |
onEvent? |
(event) => void |
Hears what the editor does and how long it took, for the host’s logging or analytics. |
EditorOptions.onEvent |
onLinkClick? |
(link) => boolean | void | Promise<boolean | void> |
Called when the user follows a link to a web page or an email, instead of the editor opening it; links to anything else are refused before it is called. Return (or resolve) true to have the editor ask and open it after all. |
EditorOptions.onLinkClick |
onSave? |
(file) => void | Promise<void> |
Receives the workbook when the user saves, e.g. to upload it. Throwing shows the error and keeps the changes. Without it, saving downloads the file. |
EditorOptions.onSave |
recalc? |
"auto" | "on" | "off" |
Live recalculation: ‘auto’ (default) turns it off for workbooks too large to recalculate quickly, where the user can turn it on; ‘on’ and ‘off’ force it. |
EditorOptions.recalc |
saveLabel? |
Localized |
The Save button’s label when the host handles saving, e.g. “Submit price list”. Default “Save”. |
EditorOptions.saveLabel |
schemas? |
WorkbookSchema[] |
Schemas to try, in order, against each workbook that is opened. |
EditorOptions.schemas |
theme? |
Partial<Record< | "warning" | "text" | "colorScheme" | "accent" | "accentStrong" | "accentSoft" | "accentBorder" | "accentTint" | "onAccent" | "surface" | "surfaceAlt" | "surfaceSunken" | "backdrop" | "focusRing" | "textMuted" | "textSubtle" | "border" | "borderStrong" | "neutral" | "success" | "successSoft" | "successBorder" | "successText" | "warningSoft" | "warningBorder" | "warningText" | "warningAccent" | "danger" | "dangerSoft" | "dangerBorder" | "onDanger" | "infoSoft" | "infoText" | "infoAccent" | "infoBannerBg" | "infoBannerBorder" | "infoBannerText" | "fieldSoft" | "fieldText" | "noteSoft" | "noteText" | "noteBorder" | "noteTipBg" | "noteTipBorder" | "placeholderBg" | "placeholderBorder" | "placeholderText" | "placeholderTextMuted" | "dropzoneBorder" | "dropzoneHoverBg" | "gridBg" | "gridText" | "gridTextOnFill" | "gridLine" | "gridBorderAuto" | "gridFreezeLine" | "gridHeaderBg" | "gridHeaderText" | "gridHeaderLine" | "gridHeaderHoverBg" | "gridHeaderSelectedBg" | "gridHeaderSelectedText" | "gridRowHeaderText" | "gridTextMuted" | "gridTextLight" | "gridBgAlt" | "gridCutFill" | "gridSelection" | "gridSelectionFill" | "gridEditedFill" | "gridEditedMark" | "gridLockedFill" | "gridLabelFill" | "gridErrorMark" | "gridWarningMark" | "gridPendingMark" | "gridNoteMark" | "gridStaleMark" | "gridUnsupportedMark" | "gridSpillLine" | "gridDropdownArrow" | "gridLink" | "gridFont" | "gridHeaderFont" | "gridHeaderFontSize" | "gridHeaderFontWeight" | "formulaRef1" | "formulaRef2" | "formulaRef3" | "formulaRef4" | "formulaRef5" | "formulaRef6" | "formulaRef7" | "chartColors" | "font" | "fontMono" | "fontSize" | "fontSizeXs" | "fontSizeSm" | "fontSizeMd" | "fontSizeLg" | "fontSizeXl" | "iconStrokeWidth" | "radius" | "radiusSm" | "radiusLg" | "shadow" | "shadowSm", string>> |
Overrides for the theme tokens (colours, fonts, sizes, corners, shadows); see EditorTheme. |
EditorOptions.theme |
translations? |
Readonly<Record<string, Readonly<Record<string, string>>>> |
Messages by language (i18next JSON, keys as in the English catalogue): whole catalogues for more languages, or a few messages worded differently. |
EditorOptions.translations |
user? |
string |
Name recorded against each action in the change history. |
EditorOptions.user |
warnOnUnload? |
boolean |
Ask before leaving the page with unsaved changes. Default true. |
EditorOptions.warnOnUnload |
workerTimeout? |
number |
How long the worker may spend on one task, in milliseconds, before it is taken to have stopped. Default 120,000; 0 waits for ever. |
EditorOptions.workerTimeout |