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
sizeissizePt. A fill'sfg,bg,fgArgbandbgArgbareforegroundandbackground, and a colour, on fills and border sides alike, is aColor(kind: ColorKind,argb,theme,tint,indexed) in place ofColorSpecandcolorArgb. - An absent value is
nullwhere-1or''used to mean absent; a chart without a title readsnull, andChartTitleKindhas noNone. - Compare enums by their named members from
@libraz/formulon, since these numbers changed:PivotSortOrder(Manual2 → 0,Descending0 → 2);AnchorKindandAnchorEditAs, which gainDefault0;ChartAxisCrosses, which has noAbsent;ChartLegendPosition, which has noNone; andWorkbookFormat, which has noUnknown. - Replaced enums:
ComparisonOperatorserves conditional-formatcellIsrules, data validation and custom filters in place ofFilterOperator;BlanksAsreplacesChartBlanksAsandSparklineEmptyCells;PivotDatePeriod, a set of bit flags, replacesPivotDateGrouping; andPivotFilterKindreplacesPivotFilterType. - Renamed members:
PivotAxis.ColisColumn,PivotCellKind.ColLabelandColSubtotalareColumnLabelandColumnSubtotal,PivotShowValuesAs.PercentOfCol,RunningTotalInColandPercentOfParentColend inColumn, andChartPlotType.ChartexisExtended. - A conditional-format read is the engine's rule record, and its formula operands start with
=; strip it where the old form was compared.
- Pin the new versions of
@libraz/formulon-cell, the adapter you use, and@libraz/formulon.zustandis now a dependency of formulon-cell rather than a peer, so drop it from your own dependencies unless you use it yourself. - Run the TypeScript compiler. A removed export, a removed
Stringskey or a renamed option is a compile error. - Search for the command IDs listed under Command IDs; a string ID is not checked by the compiler.
- Run your tests.
Mounting and the instance
| 0.14 | Now |
|---|---|
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.version | workbook.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 EvalArrayResult | sheet.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 cell | sheet.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 unavailable | sheet.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 insertColumns | sheet.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 boolean | sheet.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 pixels | workbook.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 format | workbook.sheet(ref).updateCellFormat('B12', { numberFormat: '0.0%' }), which takes an A1 cell or range |
instance.setTheme('ink') and the other set* methods | instance.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, toggleWatchWindow | instance.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, off | clipboard.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, isSheetProtected | Sheet.protect, Sheet.unprotect, Sheet.getSheetProtection |
addSlicer, removeSlicer | Sheet.addSlicer, Sheet.removeDrawing |
tracePrecedents, traceDependents, clearTraces | instance.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 profile | update({ 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 === host | instance.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() returns | toolbar: 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 options | host: { 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.evaluate | LAMBDA defined names in the workbook; formulaHints describes calls for the cell editor |
SpreadsheetInstance is the class mount() returns.
instance.store,instance.formulaandinstance.featureshave no replacement on it.resolveSpreadsheetUiOptionsfrom/extensionsresolves a profile's switches.instance.toolbarreturns anInstanceRibbon(activeTab,update,execute,focusActiveTab,on('change')).refreshPrinterProfiles()resolves withnullrather thanundefinedwhen no profile list was ever supplied.formatPainterandborderDrawarenull, notundefined, 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.14 | Now |
|---|---|
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 range | viewport: { 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 |
autoExpand | Delete 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.
| Field | Holds |
|---|---|
status | 'applied' or 'refused' |
applied | The { sheet, at } cells whose content changed |
range | The rectangle the batch wrote |
rejections | The one BatchRejection { sheet, at, code, reason } that refused the batch |
applyChanges(changes, options):
- It takes
CellChangeitems,{ sheet?, at, input }or{ sheet?, at, value, formula? }, in place of{ addr, ... }. atis an A1 address or a{ row, col }cell address.sheetis a sheet index, name orSheet, and is the active sheet when left out.valueis an engineValue:{ kind: 'number', value: 42 }is{ kind: ValueKind.Number, number: 42 }, withValueKindfrom@libraz/formulon.- The options argument is required, and
{ history: 'reset' }is what leaving it out meant. - A host's
originstarts withhost:, 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
Sheetsetters andSheet.importCsv.
Other changes to results and policy:
importCSV,applyPasteSpecial,SpreadsheetInstance.pasteSpecialandclipboard.pasteSpecialreturn aChangeBatchResult;ImportResultandPasteSpecialResultare removed.- The
'noop'status is gone: a batch that changes nothing is'applied'with an emptyapplied. - The
'rejected'status is'refused',rejectedisrejections, andrevisionis 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,BatchDeniedModeand themoveCellsinteraction 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 ownapplyChangesbatch. - A restriction on
moveCellsbecomes one onpasteand the insert operations. RecalcEvent.dirtyisRecalcEvent.cells, a list ofChangedCell.BatchRejection.addrissheetandat, andreasonis always set.
Removed exports
Removed from the root entry:
| Removed group | Use instead |
|---|---|
| The legacy mount | mount() 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 records | The Workbook and Sheet facade; engine types come from @libraz/formulon |
| The UI store and its mutators | None. The instance API reads and changes the same state |
| CSV helpers | Sheet.importCsv / Sheet.exportCsv, or instance.importCsv for the gated import |
| Custom-function registry types | LAMBDA 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 tables | The engine-backed Sheet.addSlicer, Sheet.addChart and Sheet.addTable |
| Interaction and history internals | applyChanges, commands.can / commands.execute and instance.history |
Command helpers that took the store and a WorkbookHandle | commands.execute, dialogs.open, the Workbook / Sheet facade, audit, watches and Sheet.findAll / replaceAll |
| Ribbon, dialog and editor internals | ribbon() 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:
| Removed | Use 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 helpers | None. 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.setRange | instance.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() |
createSpreadsheetStore | None. The instance API reads and changes that state |
Addr | None. 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
inferPivotFieldItemsandinferPivotSourceFieldsare removed too;PivotCache.listFieldsandlistFieldSharedItemsread the fields and items of an existing cache.openHostMenuFirstDropdown,chooseWorkbookSaveFormatandworkbookSaveFormatsare gone;SAVE_FORMATSandSaveFormatare exported from the root.saveWorkbookWithPromptsandSaveWorkbookWithPromptsOptionsbecamesaveWithPrompts(spreadsheet, { format, host })andSaveWithPromptsOptionsin@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,minimalandstandard: useui.profile, orresolveSpreadsheetUiOptions({ profile }).features.DEFAULT_OFF_FEATURE_IDS: useisFeatureDefaultOff.resolveFlags,dedupeById,flattenExtensionsandsortByPriority.
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,onBackstageOpenChangeandonFormulaBarChangeareToolbar.on('change'), whose state holdsactiveTab,displayMode,formulaBarVisibleandbackstageOpen. Toolbar.update(patch)sets the same fields after mount.onThemeChangeis the instance'son('update').
In @libraz/formulon-cell/charts:
CategoryChartData.categoriesis a list ofChartCategory({ id?, label }), socategoryIdsis gone, andcategoryFormatCodeiscategoryNumberFormat.CategoryChartSeries.valuesandstatesarepoints, a list ofCategoryChartPoint({ value, state? }).formatCodeisnumberFormatonCategoryChartSeriesandXYChartSeries, andxFormatCodeisxNumberFormat.- The
DataLabelSpecalias is gone in favour ofChartDataLabelSpec. formatTick(value, true)isformatTick(value, { percent: true }).linearScale(v, 0, 10, 200, 0)islinearScale(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 path | Now |
|---|---|
i18n/controller (createI18nController, I18nController, I18nControllerInit) | No replacement; instance.i18n is the I18n view (locale, strings, override, on('change')) |
i18n/locales | BUILT_IN_LOCALES and Locale from the root; BuiltInLocale, isBuiltInLocale and builtInLocaleFor are gone |
i18n/strings | The 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 key | Now |
|---|---|
macData | mac.data |
macSparkline | mac.sparkline |
macSlicer | mac.slicer |
macWorkbookStats | mac.workbookStats |
macInk | mac.ink |
macContextMenu | mac.contextMenu |
macHomeRibbon | mac.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 key | Now |
|---|---|
ribbonMenu.insertShiftDown | cellShiftDialog.shiftDown |
ribbonMenu.insertShiftRight | cellShiftDialog.shiftRight |
ribbonMenu.deleteShiftUp | cellShiftDialog.shiftUp |
ribbonMenu.deleteShiftLeft | cellShiftDialog.shiftLeft |
ribbonMenu.rowHeightLabel | dimensionDialog.rowHeightLabel |
ribbonMenu.colWidthLabel | dimensionDialog.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.
| Section | Removed keys |
|---|---|
ribbonMenu | 59 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 |
pivotTableDialog | 35 keys: the filterDialog and filterCondition* strings, showValuesAsRunningTotalInRow, showValuesAsRunningTotalInColumn, engineFailed |
conditionalMenu | dataBarSolidGray and the six colorScale* preset names |
toolbar | formatPainterStickyHint, freezePanesMenu, freezeFirstRow, freezeFirstCol, freezeAtSelection |
ribbon | manageRules, editComment, borderPattern, previousCommentOrNoteTitle, nextCommentOrNoteTitle |
reviewReports | repeatedWord, repeatedSpaces, spaceBeforePunctuation, lowercaseSentence, typo |
contextMenu | insertComment, deleteComment, pivotShowFieldList |
cfRulesDialog | headerPriority, headerType, headerRange |
namedRangeDialog | scopeWorkbookOnly, errorEngineFailed, confirmDeleteTitle |
conditionalDialog | rangeAuto, formatPlain |
workbookObjects | backToWorkbookObjects, pivotAvailableFields |
findReplace | replaceLabel, lookInRequiresFindTab |
formatDialog, backstage, goToDialog | formatDialog.validationListSource, backstage.statusValue, goToDialog.selectionTooLarge |
mac | mac.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 ID | Use instead |
|---|---|
mac.view.zeros | Zero 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.sheetViewDelete | mac.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.show | One 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.gallery | The View Scripts menu; View Scripts › Samples opens the same script list |
showHideNoteReview, showAllNotesReview | notesReview, the Notes menu of the default profile's Review tab; showCommentsReview is Show Comments |
- The menu factory keys
reviewCommentsandreviewNewCommentgive way toreviewNotes. - 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
slicerInsertandsparklineInsertinstead.
React and Vue adapters
Imports
The adapters no longer re-export anything from @libraz/formulon-cell.
- Import
SpreadsheetInstance,ThemeName,InteractionPolicy,viewerPolicyand the other core names from@libraz/formulon-cell. - Import
RibbonTab,RIBBON_TABSandEXCEL365_STANDARD_RIBBON_TABSfrom@libraz/formulon-cell/toolbar. - The React root exports
Spreadsheet,SpreadsheetToolbar,useSpreadsheet,useSelection,useI18n,useSpreadsheetEventand the typesSpreadsheetProps,SpreadsheetRefandSpreadsheetToolbarProps. - The Vue root exports the same components and composables and the types
SpreadsheetProps,SpreadsheetEmits,SpreadsheetExposed,SpreadsheetToolbarPropsandSpreadsheetToolbarEmits. - Vue exports
SpreadsheetToolbarfrom the package root, and the./toolbar.vuesubpath is removed. React'sToolbaralias ofSpreadsheetToolbaris 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,childrenanderrorFallback. - Vue adds
class,style,errorFallbackand 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:
featuresisui.features.getWorkbookName,printerProfiles,printerProfileId,refreshPrinterProfiles,captureScreenClipandgetFunctionArgumentHelparehost.workbookName,host.printerProfiles,host.printerProfileId,host.refreshPrinterProfiles,host.captureScreenClipandhost.functionArgumentHelp.toolbartakesribbon()ornullin place oftrueorMountToolbarOptions.workbooktakes aWorkbook.- The
functionsprop is gone.
Events
React events are onReady, onChange, onCell, onWorkbook, onRecalc, onUpdate, onSelectionChange, onLocaleChange and onError.
onChangeBatchisonChange,onCellChangeisonCell,onWorkbookChangeisonWorkbook, andonThemeChangeisonUpdate.onSelectionChangereceives aSelectionState({ sheet, active, range, ranges }) in place of{ active, anchor, range }.
Vue emits are ready, change, cell, workbook, recalc, update, selectionChange, localeChange and error.
change-batchischange,cellChangeiscell,workbookChangeisworkbook, andthemeChangeisupdate.
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
nulland returnnulluntil it is mounted and while it is disposed. - The fallback-value argument and the placeholder
'ja'locale are gone, and the selector receives theSpreadsheetInstance. - In Vue the composables accept a ref, a getter or a plain value and return a ref.
useI18nreturns one ref of{ locale, strings }.
SpreadsheetToolbar
- It takes
spreadsheetin place ofinstance. - It takes one
hooks: RibbonHooksobject in place ofonSpellingReview,onAccessibilityCheck,onRunScript,onDrawPen,onDrawEraser,onTranslate,onAddInanddropdownActions. - Its
localeprop 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
activeTabwithonTabChange(ordefaultActiveTab).onToolbarReadyisonReady, which receives theToolbarornull, andonErrorstays a prop. - In Vue the tab is
v-model:activeTab, andreadyanderrorare emits.
Import and ref changes
| 0.14 | Now |
|---|---|
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' |
Read next
- API surface — the entry points and the live instance.
- React and Vue adapters — the components, props and hooks.
- Internationalization — locale files and
Stringsoverrides. - Upgrading the engine — the
@libraz/formulonchanges this release requires.