Skip to content

Upgrading ​

formulon-cell is before 1.0, so a minor release may change the API incompatibly. The CHANGELOG marks each breaking change; this page sorts them by what a host has to edit.

Moving from 0.14 ​

The release requires @libraz/formulon 0.19, whose own changes are on Upgrading. The root entry now exports mount(), the Workbook and Sheet facade, the policy helpers and the types their signatures use; everything else moved to a subpath or became internal.

Code that reads engine records follows the engine's model:

  • A font's size is sizePt. A fill's fg, bg, fgArgb and bgArgb are foreground and background, and a colour, on fills and border sides alike, is a Color (kind: ColorKind, argb, theme, tint, indexed) in place of ColorSpec and colorArgb.
  • An absent value is null where -1 or '' used to mean absent; a chart without a title reads null, and ChartTitleKind has no None.
  • Compare enums by their named members from @libraz/formulon, since these numbers changed: PivotSortOrder (Manual 2 → 0, Descending 0 → 2); AnchorKind and AnchorEditAs, which gain Default 0; ChartAxisCrosses, which has no Absent; ChartLegendPosition, which has no None; and WorkbookFormat, which has no Unknown.
  • Replaced enums: ComparisonOperator serves conditional-format cellIs rules, data validation and custom filters in place of FilterOperator; BlanksAs replaces ChartBlanksAs and SparklineEmptyCells; PivotDatePeriod, a set of bit flags, replaces PivotDateGrouping; and PivotFilterKind replaces PivotFilterType.
  • Renamed members: PivotAxis.Col is Column, PivotCellKind.ColLabel and ColSubtotal are ColumnLabel and ColumnSubtotal, PivotShowValuesAs.PercentOfCol, RunningTotalInCol and PercentOfParentCol end in Column, and ChartPlotType.Chartex is Extended.
  • A conditional-format read is the engine's rule record, and its formula operands start with =; strip it where the old form was compared.
  1. Pin the new versions of @libraz/formulon-cell, the adapter you use, and @libraz/formulon. zustand is now a dependency of formulon-cell rather than a peer, so drop it from your own dependencies unless you use it yourself.
  2. Run the TypeScript compiler. A removed export, a removed Strings key or a renamed option is a compile error.
  3. Search for the command IDs listed under Command IDs; a string ID is not checked by the compiler.
  4. Run your tests.

Mounting and the instance ​

0.14Now
Spreadsheet.mount(host, { workbook: handle, features, toolbar: true })mount(host, { workbook, ui: { profile, features }, toolbar: ribbon() })
presets.standard()ui: { profile: 'standard' }; resolveSpreadsheetUiOptions({ profile: 'standard' }).features from /extensions reads a profile's switches
await WorkbookHandle.createDefault({ preferStub: true }) / await WorkbookHandle.loadBytes(bytes)await Workbook.createDefault({ engine: 'stub' }) / await Workbook.load(bytes), with cell and sheet methods on workbook.sheet(ref); both still return a Promise. onFallback is gone, since the engine never falls back. isUsingStub() is workbook.engine === 'stub'. handle.capabilities and EngineCapabilities are gone, since the engine provides every capability; a member the stub engine lacks throws a FormulonError with StatusCode.NotImplemented
handle.setCalcMode(mode) / setIterative(...)workbook.setCalcMode(mode) / updateIterative({ enabled, maxIterations, maxChange })
handle.versionworkbook.engineVersion, the version of the calc engine the workbook runs on; the stub engine reports 'stub'
handle.getValue({ sheet, row, col }), which returned { kind: 'number', value }workbook.sheet(ref).getValue('A1'), which returns plain data: null for a blank cell, a number, boolean or string, or an ExcelError for an error value. getTypedValue('A1') returns the tagged { kind: ValueKind.Number, number } form
handle.evaluateFormulaArray(...) and its EvalArrayResultsheet.evaluateTypedFormulaArray(at, formula) for rows of tagged Value, or sheet.evaluateFormulaArray(at, formula) for rows of plain values, with a blank range cell read as 0. A scalar result is one row of one value, and a formula that does not parse throws FormulonError
handle.spreadsheetProfileId() ('windows-en_US', 'mac-ja_JP')workbook.getProfileId(), which returns the engine's id ('win-365-en_US', 'mac-365-ja_JP'). A check such as id.startsWith('windows-') becomes id.startsWith('win-'); startsWith('mac-') still holds
handle.localeFacts(), null when unavailable, with dateOrder 'mdy', 'ymd' or 'dmy'workbook.getLocaleFacts(), which throws on failure; dateOrder is the engine's number: 0 month-day-year, 1 year-month-day, 2 day-month-year
localizeFormulaText(formula, profile)workbook.localizeFormula(formula), in the workbook's own profile with no override; it throws when the engine cannot localize the formula
handle.getFormulaForDisplay(formula)workbook.localizeFormula(formula), as for localizeFormulaText
handle.spillInfo(sheet, row, col) ({ anchorRow, anchorCol, rows, cols })sheet.getSpill(row, col), whose range is the region and anchor its formula cell. A #SPILL! anchor reads blocked: true with the rectangle it tried to fill and its cause
handle.cells(sheet), which yielded { addr, value, formula } for each populated cellsheet.listCells(range?), which returns { row, col, formula, value, kind } for each populated cell of range, or of the used range when range is left out. value is native data and kind its ValueKind
handle.precedents(addr, depth) / handle.dependents(addr, depth), null when unavailablesheet.getPrecedents(at, depth) / sheet.getDependents(at, depth), with an A1 address or (row, col, depth). Each returns { sheet, row, col } nodes, cells on other sheets included, and throws for an invalid cell. depth defaults to 1 and is capped at 32
handle.save() (bytes) / handle.saveWithDiagnostics('xlsb') ({ bytes, diagnostics })workbook.save({ format: 'xlsb' }), which returns { bytes, format, losses }. format defaults to the format the file was loaded in, and losses replaces diagnostics
insertRows(store, wb, history, atRow, count), likewise insertColumnssheet.insertRows(first, last) over a closed, zero-based span, or sheet.insertRows('3:5') in A1 form: insertRows(…, 2, 3) inserted three rows at row 3 and is sheet.insertRows(2, 4)
handle.setColumnWidth(sheet, first, last, px) / setRowHeight(sheet, row, px), in pixels, returning a booleansheet.setColumnWidth(first, last, chars) or setColumnWidth('B:D', chars), the stored width in characters from 0 to 255, and sheet.setRowHeight(first, last, pt) in points from 0 to 409; both throw on failure. A pixel width from instance.measureColumnWidths goes through sheet.convertColumnPtToChars(px * 0.75)
handle.getSheetDefaultLayoutPx(sheet), whose defaultRowHeight and defaultColWidth are in pixelsworkbook.sheet(ref).getFormatDefaults(): effectiveDefaultRowHeightPt in points and effectiveDefaultColumnWidthChars in characters. One row's height is getRowHeightPt(row)
handle.getCellXfIndex / getCellXf / addNumFmtCode / addXfRecord / setCellXfIndex to give a cell a number formatworkbook.sheet(ref).updateCellFormat('B12', { numberFormat: '0.0%' }), which takes an A1 cell or range
instance.setTheme('ink') and the other set* methodsinstance.update({ theme: 'ink' }), with the keys policy, viewport, contextMenu, overlays, ui, extensions, locale, theme, toolbar, workbook, uploadStatus and macroRecording; setFeatures is ui.features, and setPrinterProfiles / setPrinterProfileId are host.printerProfiles / host.printerProfileId. A reset by undefined, as in setPolicy(), setUi() or setExtensions(undefined), is update({ policy: null }) and likewise for any key: null restores the default (theme 'paper', locale 'en', no toolbar, an unrestricted viewport), and undefined leaves the key as it is. update({ workbook: null }) throws
instance.openFormatDialog() and the other open* methods, closeFindReplace, closeWatchWindow, toggleWatchWindowinstance.dialogs.open(id) / dialogs.close(id); the ID is the method name without open and Dialog, as in 'format', 'dataValidation' and 'pivotTable', and the method's arguments become options: openFormatDialog('font') is dialogs.open('format', { tab: 'font' }) and openPivotFieldList(sheet, index) is dialogs.open('pivotFieldList', { sheet, pivotIndex: index }). Other positional arguments become option keys of the same name: openFindReplace('replace') is { tab: 'replace' }, likewise pageSetup and chartSettings; openFilterDropdown(range, col) is { range, col }, openFunctionArguments(name, { category }) is { name, category }, and openPivotTableDialog({ placement }) is { placement }. openChartSettings, openPivotFieldList and openActivePivotFieldList returned whether they opened anything; dialogs.open returns nothing, throws for 'unsupported-platform', 'feature-disabled', 'policy-denied' and 'protected', and does nothing when there is no chart or PivotTable to open on, so ask dialogs.canOpen(id) first
instance.followActiveHyperlink()instance.commands.execute('openHyperlink')
instance.pasteSpecial, undo, redo, recalc, locale, use, remove, offclipboard.pasteSpecial(options), history.undo(), history.redo(), workbook.recalc(), i18n.locale, extensions.add, extensions.remove, and the disposer on returns. pasteSpecial returns a ChangeBatchResult, so if (clipboard.pasteSpecial(options)) becomes clipboard.pasteSpecial(options).status === 'applied'
toggleSheetProtection, setSheetProtected, isSheetProtectedSheet.protect, Sheet.unprotect, Sheet.getSheetProtection
addSlicer, removeSlicerSheet.addSlicer, Sheet.removeDrawing
tracePrecedents, traceDependents, clearTracesinstance.audit.tracePrecedents(at), audit.traceDependents(at), audit.clear(); the trace methods take the A1 address to trace from
instance.commands.canSelect() / canCopy() / canExecute(intent)commands.can({ kind: 'select' }), { kind: 'copy' }, { kind: 'edit', operation, at }
setLocale(tag), and locale: tag at mount on the default platform, where a script or custom tag such as de-Latn-DE, de-brand or zh-Hant did not select its language's formula profileupdate({ locale: tag }) and locale: tag select the profile of the tag's language: German for de-Latn-DE and de-brand, Traditional Chinese for zh-Hant. To change UI text without moving the formula profile, keep locale and pass the text through strings or i18n.override
on('themeChange' | 'localeChange')on('update'), whose source is 'user' for a change made in the UI
on('changeBatch'), on('cellChange', ({ addr, value, formula }) => …), on('workbookChange')on('change'), on('cell', ({ sheet, at, value }) => …), on('workbook'); the cell event no longer carries the formula, which instance.workbook.sheet(e.sheet).getFormula(e.at.row, e.at.col) reads (null for a constant)
on('selectionChange', ({ active, range }) => …)selection.on('change', ({ sheet, active, range }) => …), where active is { row, col } and range is { firstRow, firstCol, lastRow, lastCol }
ui: { profile: 'excel365' }ui: { profile: 'full' }, or leave profile out: 'full' is the default
host.focus() on the mount element, or document.activeElement === hostinstance.focus(). To check that the sheet has focus, compare document.activeElement with host.querySelector('.fc-host__grid'), or use host.contains(document.activeElement) for focus anywhere in the spreadsheet
ui: { profile: 'full' } or ui: { features: { ribbon: true } } for a ribbon; ui: { features: { ribbon: false } }; ribbon in what resolveSpreadsheetUiOptions() returnstoolbar: ribbon() from @libraz/formulon-cell/toolbar mounts the ribbon; leave toolbar out for none. No ui profile or switch mounts one
The getWorkbookName, printerProfiles, printerProfileId, refreshPrinterProfiles, captureScreenClip and getFunctionArgumentHelp optionshost: { workbookName, printerProfiles, printerProfileId, refreshPrinterProfiles, captureScreenClip, functionArgumentHelp }; workbookName and refreshPrinterProfiles return null rather than undefined when they have nothing
instance.toolbar.setActiveTab(tab), setDisplayMode, setFormulaBarVisible, setBackstageOpen, the matching get*() methods, applyCommand(id)instance.toolbar.update({ activeTab, displayMode, formulaBarVisible, backstageOpen }), the properties of the same names, execute(id)
Spreadsheet.mountToolbar(el, instanceRef, options)await mountToolbar(el, spreadsheet, options) from @libraz/formulon-cell/toolbar
importCSV(store, wb, text, anchor)instance.importCsv(text, { at })
exportCSV(state)sheet.exportCsv({ range: instance.selection.get().range })
findAll(state, opts) / replaceAll(...)sheet.findAll({ query, ... }) / sheet.replaceAll({ query, replacement }); the watch helpers are instance.watches
The functions mount option and formula.evaluateLAMBDA defined names in the workbook; formulaHints describes calls for the cell editor

SpreadsheetInstance is the class mount() returns.

  • instance.store, instance.formula and instance.features have no replacement on it. resolveSpreadsheetUiOptions from /extensions resolves a profile's switches.
  • instance.toolbar returns an InstanceRibbon (activeTab, update, execute, focusActiveTab, on('change')).
  • refreshPrinterProfiles() resolves with null rather than undefined when no profile list was ever supplied.
  • formatPainter and borderDraw are null, not undefined, when the feature is off.

instance.cells replaces CellRegistry. registerFormatter, unregisterFormatter, resolveDisplay, formatterIds and subscribe are add, remove, get, list and on('change'), and a formatter is a CellFormatter.

instance.history keeps clear. canUndo, canRedo and canRepeat are read-only properties, and undo() and redo() return nothing. repeat() replaces repeatLast(), and on('change') replaces subscribe. Its other members are gone.

ExtensionContext carries workbook, spreadsheet (an ExtensionSpreadsheet) and the I18n view as i18n. store, history, getWb, onWorkbookChange and ExtensionHandle.rebindWorkbook are gone.

SpreadsheetUiOptions has no theme (use the theme option) and no advancedFeatures. Its switches are in features.

Viewport ​

The viewport option and update({ viewport }) take a ViewportConfig, { mode: 'auto' } or { mode: 'fixed', range } with range an A1 range. ViewportOptions is removed from the root entry.

Both modes take selectable, tabNavigation and tabBoundary. In 'auto' mode the Tab options take effect only together with selectable.

An unset tabBoundary is 'leave' when the grid is the spreadsheet's only region. A grid-only spreadsheet that relied on Tab staying in the grid at the viewport edge sets tabBoundary: 'stop'.

0.14Now
viewport: { range: { sheet: 0, r0: 0, c0: 0, r1: 19, c1: 7 }, tabNavigation: 'editable' }viewport: { mode: 'fixed', range: 'A1:H20', tabNavigation: 'editable' }
viewport: { selectable }, without rangeviewport: { mode: 'auto', selectable }
selectable: [{ sheet: 0, r0: 1, c0: 1, r1: 10, c1: 1 }]selectable: ['B2:B11']
selectable: (addr) => …selectable: ({ addr }) => …, the context the policy.editable predicate receives
autoExpandDelete it. It never changed navigation; together with range it only made the mount throw
instance.setViewportOptions(options)instance.update({ viewport }); update({ viewport: null }) lifts the limits

Keyboard ​

The sheet's grid, not the element passed to mount, takes keyboard focus and is the sheet's one Tab stop. The mount element is no longer focusable, and grid keys act only when pressed in the grid. instance.focus() moves focus to the grid.

Escape in the Watch Window or the PivotTable field list, on both platforms, moves focus to the sheet and leaves the pane open; the pane closes by its Close button. Host code closes either pane with dialogs.close('watchWindow') or dialogs.close('pivotFieldList').

Keys pressed in a modal dialog no longer bubble out of it. A host shortcut that acted on them through a bubble-phase keydown listener on document or window registers it in the capture phase, addEventListener('keydown', fn, true), to keep seeing them. See Dialog behavior.

Results of cell writes ​

Every batch of cell writes returns one ChangeBatchResult. A batch is all or nothing.

FieldHolds
status'applied' or 'refused'
appliedThe { sheet, at } cells whose content changed
rangeThe rectangle the batch wrote
rejectionsThe one BatchRejection { sheet, at, code, reason } that refused the batch

applyChanges(changes, options):

  • It takes CellChange items, { sheet?, at, input } or { sheet?, at, value, formula? }, in place of { addr, ... }.
  • at is an A1 address or a { row, col } cell address. sheet is a sheet index, name or Sheet, and is the active sheet when left out.
  • value is an engine Value: { kind: 'number', value: 42 } is { kind: ValueKind.Number, number: 42 }, with ValueKind from @libraz/formulon.
  • The options argument is required, and { history: 'reset' } is what leaving it out meant.
  • A host's origin starts with host:, as in 'host:my-import'.
  • It writes nothing when any change is refused. The interaction policy and sheet protection decide it whatever its history mode, 'reset' included.
  • Ungated writes go through the Sheet setters and Sheet.importCsv.

Other changes to results and policy:

  • importCSV, applyPasteSpecial, SpreadsheetInstance.pasteSpecial and clipboard.pasteSpecial return a ChangeBatchResult; ImportResult and PasteSpecialResult are removed.
  • The 'noop' status is gone: a batch that changes nothing is 'applied' with an empty applied.
  • The 'rejected' status is 'refused', rejected is rejections, and revision is read from the instance instead of the result.
  • The 'unsupported' permission code is 'effectTooLarge'. A batch or operation whose range or merged cells are too large to authorize is refused with it.
  • InteractionPolicy.batchDenied, BatchDeniedMode and the moveCells interaction operation are removed.
  • A batch is refused by its first refused cell. Cut, drag-move and Insert Copied Cells are decided as the paste and insert they perform.
  • Delete batchDenied: 'reject'. 'skipIneligible' has no replacement: apply the eligible cells as their own applyChanges batch.
  • A restriction on moveCells becomes one on paste and the insert operations.
  • RecalcEvent.dirty is RecalcEvent.cells, a list of ChangedCell. BatchRejection.addr is sheet and at, and reason is always set.

Removed exports ​

Removed from the root entry:

Removed groupUse instead
The legacy mountmount() and SpreadsheetInstance; events are on('change' | 'cell' | 'workbook' | 'recalc' | 'update' | 'error'), selection.on('change') and i18n.on('change')
WorkbookHandle and the engine-layer helpers and recordsThe Workbook and Sheet facade; engine types come from @libraz/formulon
The UI store and its mutatorsNone. The instance API reads and changes the same state
CSV helpersSheet.importCsv / Sheet.exportCsv, or instance.importCsv for the gated import
Custom-function registry typesLAMBDA defined names in the workbook; formulaHints for the cell editor's hints
Session-only sheet views, error-indicator helpers, compatibility report builders, and session slicers, charts and tablesThe engine-backed Sheet.addSlicer, Sheet.addChart and Sheet.addTable
Interaction and history internalsapplyChanges, commands.can / commands.execute and instance.history
Command helpers that took the store and a WorkbookHandlecommands.execute, dialogs.open, the Workbook / Sheet facade, audit, watches and Sheet.findAll / replaceAll
Ribbon, dialog and editor internalsribbon() and mountToolbar; the public ribbon pieces are in @libraz/formulon-cell/toolbar, and the locale dictionaries (de, en, fr, ja, ko, th, zh) in @libraz/formulon-cell/i18n/<locale>

Single exports from those groups map as follows:

RemovedUse instead
suggestFunctions(text, caret, max)workbook.suggestFunctions(text, caret, { max })?.names
findActiveSignature(text, caret, { listSeparator })workbook.functionCallAt(text, caret). Its argIndex is the former activeArgIndex, and the separator comes from the workbook
FUNCTION_SIGNATURES[name], FUNCTION_DESCRIPTIONS[name]workbook.describeFunction(name)?.args, workbook.describeFunction(name)?.description
The names and getCustomFunctionArgs arguments of those helpersNone. The workbook's own LAMBDA names are offered, and { sheet } adds a sheet's. See Function help from the workbook
formatCell(value)sheet.getDisplayText('A1').text, or getDisplayText(row, col): the text the grid shows, General format included
mutators.setActive, mutators.setRangeinstance.selection.set(ref)
mutators.extendRangeTo(store, addr)instance.selection.extend(ref), which extends the selection from its anchor to ref. selection.set('B2:D8') selects a range in one call
getPageSetup(state, sheet)workbook.sheet(ref).getPageSetup()
createSpreadsheetStoreNone. The instance API reads and changes that state
AddrNone. Use a plain { row, col }, with sheet where needed; the instance API takes A1 text
The legacy mount: 14 names

CellChangeEvent, DefaultDynamicDropdownsOptions, LocaleChangeEvent, MountOptions, SelectionChangeEvent, Spreadsheet, SpreadsheetEventHandler, SpreadsheetEventName, SpreadsheetEvents, ThemeChangeEvent, ToolbarInstance, ToolbarInstanceRef, WorkbookChangeEvent, createDefaultDynamicDropdownsCtx

`WorkbookHandle` and the engine-layer helpers and records: 65 names

Addr, CellPatch, CellPatchAtomicResult, CellSnapshot, CellValue, ChangeListener, EngineCapabilities, FileLossEntry, FileLossId, FileLossPhase, FunctionMetadataResult, LOCALE_TAGS, LoadDiagnostics, LoadOptions, PIVOT_SHOW_AS_BASE_NEXT, PIVOT_SHOW_AS_BASE_PREVIOUS, PhoneticProperties, PhoneticRun, PivotAggregation, PivotAxis, PivotCalendar, PivotCell, PivotDataFieldSpec, PivotDateGrouping, PivotFieldSpec, PivotFilterSpec, PivotFilterType, PivotFilterValueKind, PivotLayoutResult, PivotShowValuesAs, PivotSortOrder, PivotTableSummary, Range, SaveDiagnostics, SheetVisibility, SpreadsheetCompatibilityId, SpreadsheetCompatibilityItem, SpreadsheetCompatibilityStatus, SpreadsheetCompatibilitySummary, SpreadsheetProfileId, WORKBOOK_OBJECT_KINDS, WorkbookHandle, WorkbookHandlePivotMethods, WorkbookObjectKind, WorkbookObjectRecord, WorkbookSaveOptions, classifyWorkbookObjectPath, fileLossEntries, formatCell, hasLoadLosses, hydrateTableOverlaysFromEngine, isSpreadsheetFeatureAvailable, isSpreadsheetFeatureWritable, isUsingStub, listWorkbookObjects, spreadsheetCompatibilityItem, spreadsheetCompatibilityStatus, summarizePivotTables, summarizeSpreadsheetCompatibility, tableOverlaysFromEngine, workbookObjectExtension, workbookObjectKindCounts, workbookObjectKindLabel, workbookObjectName, workbookObjectsByKind

The UI store and its mutators: 51 names

CellAlign, CellBorderSide, CellBorderStyle, CellBorders, CellFormat, CellGradientFill, CellGradientStop, CellVAlign, CellValidation, ChartsSlice, ConditionalIconRef, ConditionalIconSet, ConditionalRule, ConditionalScalePoint, ConditionalSlice, CustomCellStyle, ErrorIndicatorSlice, FormatSlice, MergesSlice, NegativeStyle, NumFmt, PageMargins, PageOrientation, PageSetup, PageSetupSlice, PaperSize, ProtectionSlice, SessionChart, SessionChartKind, SessionChartUnsupportedReason, SlicerNativeSettings, SlicerSpec, SlicersSlice, Sparkline, SparklineGroupSettings, SparklineKind, SparklineSlice, SpreadsheetStore, State, StatusAggKey, ThreadedCommentsSlice, TracesSlice, ValidationErrorStyle, ValidationListSource, ValidationMeta, ValidationOp, WatchSlice, WorkbookViewMode, createSpreadsheetStore, getPageSetup, mutators

CSV helpers: 4 names

ExportOptions, ImportCSVOptions, exportCSV, importCSV

Custom-function registry types: 4 names

CustomFunction, CustomFunctionMeta, CustomFunctionReturn, FormulaRegistry

Session-only sheet views, error-indicator helpers, compatibility report builders, and session slicers, charts and tables: 68 names

ChartMutationAuthorization, CreateSessionChartOptions, CreateSlicerOptions, CreateSlicerResult, CustomTableStyle, FormatAsTableOptions, SessionChartLabels, SessionChartPatch, SessionChartSeriesInput, SessionChartsHandle, SheetView, SheetViewPatch, SheetViewSnapshotInput, SheetViewSort, SheetViewStoreResult, TableColumnTotals, TableNameError, TableOverlay, TableOverlayPatch, TableStyle, TableTotalsFunction, activateSheetView, addSessionChartSeries, applySheetView, captureSheetView, clearIgnoredCellErrors, clearSessionChart, clearSessionChartsInRange, clearSlicerSelection, clearTable, clearTablesInRange, createSessionChart, createSlicer, defaultTableOverlay, deleteSheetView, engineTableOverlays, findSheetView, findSlicerTable, formatAsTable, ignoreCellError, isBandedRow, isCellErrorIgnored, isHeaderRow, isTotalRow, listSessionCharts, listSlicerValues, listSlicers, listTableOverlays, recomputeSlicerFilters, removeSessionChartSeries, removeSlicer, removeTable, resolveSlicerSpec, restoreCellErrorIndicator, saveSheetView, sessionChartById, sessionChartsForRange, sessionTableOverlays, setSlicerSelected, tableForCell, tableOverlayAt, tableOverlayById, toggleCellErrorIgnored, updateSessionChart, updateSlicer, updateTableOverlay, upsertSheetView, upsertTable

Interaction and history internals: 14 names

CellBatchCommand, CellBatchOperation, CellChangeInput, HistoryEntry, HistoryTransaction, InteractionController, InteractionControllerOptions, OperationEffect, OperationIntent, Origin, canRedo, canUndo, redo, undo

Command helpers that took the store and a `WorkbookHandle`: 133 names

ActiveSignature, AllowedEditRangeOptions, AutoSumFunction, AutofitOptions, BorderPreset, BuildPrintDocumentOptions, CSVDelimiter, CSVEncodeOptions, CSVParseOptions, ClipboardCell, ClipboardSnapshot, CommentEntry, CopyResult, CreatePivotTableOptions, CreatePivotTableResult, DefinedNameAttrs, DefinedNameDeleteResult, DefinedNameEntry, DefinedNameMutationResult, ExternalLinkKind, ExternalLinkRecord, ExternalLinksSummary, FUNCTION_SIGNATURES, FindMatch, FindOptions, FormulaScanOptions, HyperlinkEntry, MarginPreset, PageSetupEntry, PageSetupPatch, PasteOperation, PasteSpecialOptions, PasteWhat, PivotFieldItemVisibility, PivotSourceField, PrintDocument, QuickAnalysisAction, QuickAnalysisActionId, QuickAnalysisGroup, QuickAnalysisInput, RibbonFillAction, STATUS_AGGREGATE_KEYS, SelectionStats, SheetProtectionOptions, SparklineEntry, StatusAggregateEntry, TableOption, TableRenameResult, WORKBOOK_SAVE_FORMATS, WorkbookSaveFormat, WorkbookSaveLoss, WorkbookSaveOutcome, XlsbContentLossId, addAllowedEditRange, addConditionalRule, addSheet, addTraceArrow, applyPasteSpecial, applyTextScriptToRange, autoSum, autofitColWidth, autofitColsWidth, autofitRowHeight, autofitRowsHeight, buildPrintDocument, clearConditionalRules, clearConditionalRulesInRange, clearFormat, clearHyperlink, clearSparkline, clearSparklinesInRange, clearTraceArrows, clearWatchedCells, conditionalRulesForRange, copy, countUniqueRangeCells, createPivotTableFromRange, cut, deleteCols, deleteDefinedName, deleteRows, enabledQuickAnalysisActions, findActiveSignature, findAll, formatNumber, hyperlinkAt, insertCols, insertRows, isQuickAnalysisActionEnabled, isSheetProtected, isWatched, listComments, listConditionalRules, listDefinedNames, listEngineHyperlinks, listExternalLinks, listHyperlinks, listPageSetups, listSparklines, pageSetupForSheet, protectedSheetPassword, quickAnalysisActionById, removeConditionalRuleAt, removeDuplicates, renameActiveTable, replaceAll, resetPageSetup, resolvePrinterProfileBounds, setHyperlink, setPageSetup, setPrintTitleCols, setPrintTitleRows, setProtectedSheet, setRowsHeight, setSparkline, setTableColumnFunction, setWatchWindowOpen, sparklineAt, statusAggregateValue, suggestFunctions, summarizeExternalLinks, textToColumns, toggleProtectedSheet, toggleTableOption, toggleWatchCell, traceDependents, tracePrecedents, unwatchCell, upsertDefinedName, visibleStatusAggregates, watchCell, whenSheetPasswordsHashed, writeWorkbook

Ribbon, dialog and editor internals: 117 names

ActiveState, ApplyRibbonCommandDeps, ArgHelperLabels, AutoSumFormulaName, AutocompleteLabels, BORDER_PRESETS, BORDER_STYLES, ConditionalApplyFormatControls, ConditionalApplyFormatLabels, ConditionalApplyFormatOptions, ConditionalDialogOpenOptions, ConditionalFormatDialogStyle, ConditionalFormatStyleOption, ConditionalFormatStyleStrings, ContextMenuDeps, DYNAMIC_RIBBON_DROPDOWN_HANDLER_ATTRS, DYNAMIC_RIBBON_DROPDOWN_HANDLER_DATASET_KEYS, DYNAMIC_RIBBON_DROPDOWN_MENU_REFRESHERS, DynamicDropdownMenuRefresherKey, DynamicDropdownsApi, DynamicDropdownsCtx, DynamicDropdownsUiTheme, EMPTY_ACTIVE_STATE, ErrorTriangleHit, ErrorTriangleKind, FONT_FAMILIES, FONT_SIZES, FUNCTION_DESCRIPTIONS, FunctionCategory, FxDialogOpenOptions, GridHitState, RIBBON_KEYSHORTCUTS, RIBBON_TAB_LABELS, RangePickerControlOptions, ReportDialogLabels, ReportItem, ReportOptions, ResolvedTheme, ReviewCell, ReviewCellValue, RibbonActivationEntry, RibbonActivationKind, RibbonActivationSpec, RibbonCommandTableMutator, RibbonDropdownSpec, RibbonFillSeriesMode, RibbonMenuFactory, RibbonMenus, RibbonRenderHelpers, RibbonReportItem, RibbonReportLang, RibbonRuntime, RibbonUiState, SHAPE_CONTEXTUAL_RIBBON_TABS, ScriptCommand, SpreadsheetCompatibilityReportItem, TABLE_CONTEXTUAL_RIBBON_TABS, TableVariantId, ToolbarLang, ToolbarMenuText, ToolbarText, TotalsChevron, ValidationChevron, analyzeAccessibilityCells, analyzeSpellingCells, appendConditionalApplyFormatControls, applyConditionalStylePreview, applyPatchToConditionalApplyControls, applyPresetPatchToConditionalApplyControls, applyRibbonCommand, attachContextMenu, attachRangePickerButton, buildFileLossReport, buildSpreadsheetCompatibilityReport, collectConditionalApplyPatch, conditionalStyleFromValue, conditionalStyleOptions, createDynamicDropdowns, de, dictionaries, dictionaryLocaleFor, en, fr, full, gridHitState, isRibbonActivatableCommand, ja, ko, localizeBorderPresets, localizeBorderStyles, minimal, openDataTableDialog, parseScriptCommand, presets, projectActiveState, projectDisabledState, reportDialogLabels, resolveFlags, resolveTheme, ribbonActivatableCommandIds, ribbonActivatableCommands, ribbonActivatableSurfaceCommandIds, ribbonActivatableSurfaceCommands, ribbonActivationCategories, ribbonActivationCommandIds, ribbonActivationEntries, ribbonActivationEntriesForCommands, ribbonActivationForCommand, ribbonSurfaceCommandIds, ribbonSurfaceCommands, ribbonTabLabel, showConditionalFormatCustomStyleDialog, showReport, standard, th, updateRangePickerLabel, zh

  • inferPivotFieldItems and inferPivotSourceFields are removed too; PivotCache.listFields and listFieldSharedItems read the fields and items of an existing cache.
  • openHostMenuFirstDropdown, chooseWorkbookSaveFormat and workbookSaveFormats are gone; SAVE_FORMATS and SaveFormat are exported from the root.
  • saveWorkbookWithPrompts and SaveWorkbookWithPromptsOptions became saveWithPrompts(spreadsheet, { format, host }) and SaveWithPromptsOptions in @libraz/formulon-cell/toolbar.

Moved exports ​

These names keep their meaning and are imported from a subpath:

Moved to `@libraz/formulon-cell/toolbar`: 26 names

BuildRibbonModelOptions, BuildRibbonSearchIndexOptions, CHART_CONTEXTUAL_RIBBON_TABS, CONTEXTUAL_RIBBON_TABS, DisabledReasonProjectionOptions, EXCEL365_MAC_RIBBON_TABS, EXCEL365_STANDARD_RIBBON_TABS, MountToolbarOptions, OPTIONAL_RIBBON_TABS, PICTURE_CONTEXTUAL_RIBBON_TABS, RIBBON_TABS, RibbonCommand, RibbonDisplayMode, RibbonGroupModel, RibbonHooks, RibbonOption, RibbonProfile, RibbonSearchItem, RibbonSearchItemKind, RibbonSearchUsagePrior, RibbonTab, RibbonTabModel, buildRibbonModel, buildRibbonSearchIndex, projectDisabledReason, queryRibbonSearchIndex

Moved to `@libraz/formulon-cell/extensions`: 34 names

ALL_FEATURE_IDS, Extension, ExtensionContext, ExtensionHandle, ExtensionInput, FeatureFlags, FeatureId, ResolvedSpreadsheetUiOptions, allBuiltIns, charts, clipboard, conditionalDialog, contextMenu, findReplace, formatDialog, formatPainter, goToSpecialDialog, hoverComment, hyperlinkDialog, isFeatureDefaultOff, iterativeDialog, namedRangeDialog, pageSetupDialog, pasteSpecial, pivotTableDialog, quickAnalysis, resolveSpreadsheetUiOptions, slicer, statusBar, validationList, viewToolbar, watchWindow, wheel, workbookObjects

Moved to `@libraz/formulon-cell/charts`: 34 names

CategoryChartData, CategoryChartSeries, ChartAxisSpec, ChartData, ChartDataLabelSpec, ChartDataLabelsSpec, ChartEmptyCellMode, ChartFillSpec, ChartFilterSpec, ChartGrouping, ChartKind, ChartLabelPosition, ChartLegendSpec, ChartLineSpec, ChartMarkerSpec, ChartPlotBounds, ChartPointState, ChartPointStyleSpec, ChartPrimitive, ChartPrimitiveRole, ChartPrimitiveTag, ChartScatterStyle, ChartScene, ChartSeriesDirection, ChartSeriesStyleSpec, ChartSpec, ChartValueFormatter, XYChartData, XYChartPoint, XYChartSeries, formatChartNumber, formatChartValue, layoutChart, layoutUnsupportedChart

@libraz/formulon-cell/extensions no longer exports these:

  • presets, full, minimal and standard: use ui.profile, or resolveSpreadsheetUiOptions({ profile }).features.
  • DEFAULT_OFF_FEATURE_IDS: use isFeatureDefaultOff.
  • resolveFlags, dedupeById, flattenExtensions and sortByPriority.

resolveSpreadsheetPlatform and the UI option types (SpreadsheetUiOptions, SpreadsheetUiProfile, SpreadsheetPlatform, ResolvedSpreadsheetPlatform, SpreadsheetFeatureSwitches) are exported from the root entry only.

MountToolbarOptions keeps hooks, ribbonTabs, activeTab and formulaBarVisible, and gains displayMode and signal; its other options are gone.

  • The callbacks onTabChange, onCollapsedChange, onDisplayModeChange, onBackstageOpenChange and onFormulaBarChange are Toolbar.on('change'), whose state holds activeTab, displayMode, formulaBarVisible and backstageOpen.
  • Toolbar.update(patch) sets the same fields after mount.
  • onThemeChange is the instance's on('update').

In @libraz/formulon-cell/charts:

  • CategoryChartData.categories is a list of ChartCategory ({ id?, label }), so categoryIds is gone, and categoryFormatCode is categoryNumberFormat.
  • CategoryChartSeries.values and states are points, a list of CategoryChartPoint ({ value, state? }).
  • formatCode is numberFormat on CategoryChartSeries and XYChartSeries, and xFormatCode is xNumberFormat.
  • The DataLabelSpec alias is gone in favour of ChartDataLabelSpec.
  • formatTick(value, true) is formatTick(value, { percent: true }).
  • linearScale(v, 0, 10, 200, 0) is linearScale(v, { domain: { min: 0, max: 10 }, range: { from: 200, to: 0 } }).

Locale files and Strings ​

@libraz/formulon-cell/i18n/* resolves to the locale files only: de, en, fr, ja, ko, th and zh, each exporting its Strings as the default export and under its own name.

Former pathNow
i18n/controller (createI18nController, I18nController, I18nControllerInit)No replacement; instance.i18n is the I18n view (locale, strings, override, on('change'))
i18n/localesBUILT_IN_LOCALES and Locale from the root; BuiltInLocale, isBuiltInLocale and builtInLocaleFor are gone
i18n/stringsThe Strings and DeepPartial types from the root, the dictionaries from the locale files; dictionaries, defaultStrings, dictionaryLocaleFor and mergeStrings are gone
i18n/locale-for-strings (bundledLocaleForStrings)No replacement

Strings has a required mac section, and the seven Mac sections moved under it with their keys unchanged:

Former keyNow
macDatamac.data
macSparklinemac.sparkline
macSlicermac.slicer
macWorkbookStatsmac.workbookStats
macInkmac.ink
macContextMenumac.contextMenu
macHomeRibbonmac.homeRibbon

A host that passes a complete Strings object, such as its own locale pack, adds mac and the other new keys; a built-in locale file shows the full shape.

Six keys moved to the section of their dialog:

Former keyNow
ribbonMenu.insertShiftDowncellShiftDialog.shiftDown
ribbonMenu.insertShiftRightcellShiftDialog.shiftRight
ribbonMenu.deleteShiftUpcellShiftDialog.shiftUp
ribbonMenu.deleteShiftLeftcellShiftDialog.shiftLeft
ribbonMenu.rowHeightLabeldimensionDialog.rowHeightLabel
ribbonMenu.colWidthLabeldimensionDialog.colWidthLabel

Keys that no part of the UI reads were removed. A locale pack or a strings override that still sets one fails the Strings type check; delete the key.

SectionRemoved keys
ribbonMenu59 keys: status and prompt messages (sort, print area, page breaks, sheet background, print titles, defined names, Text to Columns, Remove Duplicates, workbook protection), the cellStyle* names, the tableStyle* option labels, the four createFromSelection edge names, pivotTableStyleCustom, scriptCommandPrompt, scriptCommandInvalid
pivotTableDialog35 keys: the filterDialog and filterCondition* strings, showValuesAsRunningTotalInRow, showValuesAsRunningTotalInColumn, engineFailed
conditionalMenudataBarSolidGray and the six colorScale* preset names
toolbarformatPainterStickyHint, freezePanesMenu, freezeFirstRow, freezeFirstCol, freezeAtSelection
ribbonmanageRules, editComment, borderPattern, previousCommentOrNoteTitle, nextCommentOrNoteTitle
reviewReportsrepeatedWord, repeatedSpaces, spaceBeforePunctuation, lowercaseSentence, typo
contextMenuinsertComment, deleteComment, pivotShowFieldList
cfRulesDialogheaderPriority, headerType, headerRange
namedRangeDialogscopeWorkbookOnly, errorEngineFailed, confirmDeleteTitle
conditionalDialograngeAuto, formatPlain
workbookObjectsbackToWorkbookObjects, pivotAvailableFields
findReplacereplaceLabel, lookInRequiresFindTab
formatDialog, backstage, goToDialogformatDialog.validationListSource, backstage.statusValue, goToDialog.selectionTooLarge
macmac.data.consolidate.sourcesHint, mac.data.subtotal.unsupportedOption, mac.sparkline.outOfBounds, mac.slicer.table, mac.slicer.chooseTableAndColumn, mac.contextMenu.editPhonetic

buildRibbonModel and buildRibbonSearchIndex take the locale as their first argument and no longer accept a Strings object there. Pass the locale and the dictionary as an option: buildRibbonModel('ja', { strings }).

Command IDs ​

CommandId is the type of the IDs commands.execute and commands.can take. These IDs are gone:

Removed IDUse instead
mac.view.zerosZero values is in the Mac Preferences window: dialogs.open('preferences', { pane: 'view' }) opens it on its View pane. The default profile keeps viewZeros, and there dialogs.open('preferences') throws unsupported-platform
mac.view.sheetViewSave, mac.view.sheetViewDeletemac.view.sheetViewKeep in place of Save, and Delete in the Sheet View Options window (mac.view.sheetViewOptions) in place of Delete; mac.view.sheetViewNew and mac.view.sheetViewExit are the other sheet view commands
mac.view.showOne command per control: mac.view.navigation, mac.view.ruler, mac.view.gridlines, mac.view.formulaBar, mac.view.headings, mac.view.dataTypeIcons, mac.view.cellFocus
mac.automate.galleryThe View Scripts menu; View Scripts › Samples opens the same script list
showHideNoteReview, showAllNotesReviewnotesReview, the Notes menu of the default profile's Review tab; showCommentsReview is Show Comments
  • The menu factory keys reviewComments and reviewNewComment give way to reviewNotes.
  • The Freeze Panes menu's first entry has the menu item ID mac.view.freeze.panes.
  • An interaction policy that checked a Mac ribbon button's ID when a slicer or sparklines were added through the instance API checks slicerInsert and sparklineInsert instead.

React and Vue adapters ​

Imports ​

The adapters no longer re-export anything from @libraz/formulon-cell.

  • Import SpreadsheetInstance, ThemeName, InteractionPolicy, viewerPolicy and the other core names from @libraz/formulon-cell.
  • Import RibbonTab, RIBBON_TABS and EXCEL365_STANDARD_RIBBON_TABS from @libraz/formulon-cell/toolbar.
  • The React root exports Spreadsheet, SpreadsheetToolbar, useSpreadsheet, useSelection, useI18n, useSpreadsheetEvent and the types SpreadsheetProps, SpreadsheetRef and SpreadsheetToolbarProps.
  • The Vue root exports the same components and composables and the types SpreadsheetProps, SpreadsheetEmits, SpreadsheetExposed, SpreadsheetToolbarProps and SpreadsheetToolbarEmits.
  • Vue exports SpreadsheetToolbar from the package root, and the ./toolbar.vue subpath is removed. React's Toolbar alias of SpreadsheetToolbar is removed.
  • Neither adapter exposes ./toolbar.css. Load the ribbon CSS from @libraz/formulon-cell/styles/toolbar.css, or @libraz/formulon-cell/styles.css, which includes it.

Props ​

The Spreadsheet props are the SpreadsheetOptions keys plus the adapter's own:

  • React adds className, style, children and errorFallback.
  • Vue adds class, style, errorFallback and a default slot that receives { spreadsheet }.

Every key except seed and signal is applied to the live instance with update when it changes, so an inline object literal no longer remounts. An option update refuses is reported to onError (React) or @error (Vue).

Props that moved with the options:

  • features is ui.features.
  • getWorkbookName, printerProfiles, printerProfileId, refreshPrinterProfiles, captureScreenClip and getFunctionArgumentHelp are host.workbookName, host.printerProfiles, host.printerProfileId, host.refreshPrinterProfiles, host.captureScreenClip and host.functionArgumentHelp.
  • toolbar takes ribbon() or null in place of true or MountToolbarOptions.
  • workbook takes a Workbook.
  • The functions prop is gone.

Events ​

React events are onReady, onChange, onCell, onWorkbook, onRecalc, onUpdate, onSelectionChange, onLocaleChange and onError.

  • onChangeBatch is onChange, onCellChange is onCell, onWorkbookChange is onWorkbook, and onThemeChange is onUpdate.
  • onSelectionChange receives a SelectionState ({ sheet, active, range, ranges }) in place of { active, anchor, range }.

Vue emits are ready, change, cell, workbook, recalc, update, selectionChange, localeChange and error.

  • change-batch is change, cellChange is cell, workbookChange is workbook, and themeChange is update.

Refs and hooks ​

A React ref and a Vue template ref hold { spreadsheet }, the mounted SpreadsheetInstance or null. The instance field is renamed.

useSpreadsheet(spreadsheet, selector), useSelection, useI18n and useSpreadsheetEvent:

  • They take the instance or null and return null until it is mounted and while it is disposed.
  • The fallback-value argument and the placeholder 'ja' locale are gone, and the selector receives the SpreadsheetInstance.
  • In Vue the composables accept a ref, a getter or a plain value and return a ref. useI18n returns one ref of { locale, strings }.

SpreadsheetToolbar ​

  • It takes spreadsheet in place of instance.
  • It takes one hooks: RibbonHooks object in place of onSpellingReview, onAccessibilityCheck, onRunScript, onDrawPen, onDrawEraser, onTranslate, onAddIn and dropdownActions.
  • Its locale prop is gone because the ribbon follows the instance.
  • Adding or removing a hook remounts the ribbon. A new function identity is picked up in place.
  • In React the tab is activeTab with onTabChange (or defaultActiveTab). onToolbarReady is onReady, which receives the Toolbar or null, and onError stays a prop.
  • In Vue the tab is v-model:activeTab, and ready and error are emits.

Import and ref changes ​

0.14Now
import { SpreadsheetInstance } from '@libraz/formulon-cell-react' (or -vue)import { SpreadsheetInstance } from '@libraz/formulon-cell'
<Spreadsheet ref> → .instance.spreadsheet
<SpreadsheetToolbar instance={...} /><SpreadsheetToolbar spreadsheet={...} />
import '@libraz/formulon-cell-react/toolbar.css'import '@libraz/formulon-cell/styles/toolbar.css'
import '@libraz/formulon-cell-vue/toolbar.css'import '@libraz/formulon-cell/styles/toolbar.css'
import SpreadsheetToolbar from '@libraz/formulon-cell-vue/toolbar.vue'import { SpreadsheetToolbar } from '@libraz/formulon-cell-vue'