Skip to content

Upgrading ​

Version policy ​

Formulon is before 1.0. A minor release may change the API incompatibly, and a patch release does not.

Each minor release with breaking changes comes with an upgrade guide in the repository, docs/releases/upgrading-<major>.<minor>.md. A patch release has none. The release notes index lists every guide, and the CHANGELOG marks each breaking change as BREAKING.

Install an exact version, and read the guides between your version and the new one before you move.

Moving to 0.19 ​

0.19 makes the C ABI, the two JavaScript packages and the Python package one interface, with the same names, the same records and the same error model. Almost every program written against 0.18 needs changes, and most of them are renames.

The upgrade guide covers every change with before and after code. This section lists what you have to act on: first the changes every surface shares, then each surface's own. The rules behind the new shapes are on API conventions.

  1. Pin the new version and install it. A C caller also recompiles.
  2. In TypeScript, run the compiler. Most renamed keys and types are compile errors.
  3. In JavaScript without types and in Python, search your code for the former names in the guide's name migration tables. Some changes fail only at run time. An unknown key throws TypeError, and so does a keyword argument passed under its old name.
  4. Run your tests.

The guide also lists the changes binding by binding.

Names ​

One naming convention covers every public function, type and field in C, JavaScript and Python, and the former names are removed with no aliases.

  • Col survives only in coordinate names such as firstCol. PivotAxis.Col is PivotAxis.Column, and likewise PivotCellKind.ColumnLabel and PivotShowValuesAs.PercentOfColumn.
  • A field with a unit carries it: zoomScale is zoomPct, a margin left is leftIn, a font size is sizePt.

A rename that did not change the call's shape is not repeated here. Look it up in Name migration.

Sheet handles ​

A sheet-scoped call moves from the workbook onto a Sheet handle, and the sheet argument disappears:

diff
- wb.setNumber(sheet, row, col, 42)
+ wb.sheet(sheet).setNumber(row, col, 42)
diff
- wb.set_number(sheet, row, col, 42.0)
+ wb[sheet].set_number(row, col, 42.0)  # or wb.sheet(sheet)

Calls that address the whole workbook (save, recalc, addFont, setDefinedName, setProfileId and the others without a sheet argument) stay on Workbook.

wb.sheet(key):

  • It takes an index, a name or a Sheet.
  • It returns the same object for the same sheet.
  • The handle follows its sheet through add, copy, move and rename.
  • It throws StatusCode.NotFound once the sheet is removed.

Tables, pivots, pivot caches, charts, pictures, shapes and slicers are handles in the same way. The parent keeps add*, remove*, list* and the lookup (ws.table(name), ws.pivot(ref), ws.chart(id)). Every add* returns the handle, and a list* call returns handles, so map them through getProperties() before JSON.stringify.

A failed call throws FormulonError (Python: FormulonError or a subclass) instead of returning a status. Sheet handles in the guide has the full list.

Method shapes ​

Positional argument lists became records, and the verb says what the call does to them.

VerbDoes
set<X>(record)Replaces a record
set<X>(null)Removes it
update<X>(patch)Changes only the keys the patch names
reset<X>Restores the default

So setIterative(enabled, maxIterations, maxChange) is updateIterative(patch), clearPinnedNow() is setPinnedNow(null), removeAutoFilter() is setAutoFilter(null), and clearRowHeight is resetRowHeight.

An unknown key in a patch or an input record throws TypeError at any depth. null is accepted only for a key that can be cleared.

A hyperlink carries the range it covers. setHyperlink(link), whose HyperlinkInput.range is required, replaces addHyperlink and addHyperlinkRange.

  • A link on exactly that range is replaced in place, and any other is appended.
  • removeHyperlink(range) removes every link that intersects the range.
  • setHyperlink(cell, null) is gone.
  • Setting applies Excel's Hyperlink cell style to the range, and removing resets it to the default format.

Row and column spans are inclusive (first, last) pairs, inserts and deletes included:

diff
- ws.insertRows(3, 2)  // two rows at index 3
+ ws.insertRows(3, 4)  // rows 3 to 4, inclusive

Objects that live under a key are addressed by it.

  • addCfRule returns the rule's CfRuleId.
  • Validations and sparkline groups have ids.
  • A protected range is found by its name.
  • A position still works where a list has one.

Drawings and tables:

  • A drawing's placement is one nested anchor, and drawing.update({ name, description, hidden, anchor }) replaces rename and setAnchor on every drawing kind.
  • A table column's totals and calculated-column formula go through table.update({ columns }) (Python update(columns=[TableColumnPatch(...)])), which replaces setColumnTotals and TableColumnTotalsInput. Element i patches column i.

Pivots:

  • A pivot item bound to a cache index is pivot.addFieldItem(field, { cacheIndex }, { visible: false }).
  • A pivot cache's worksheet source is { range, sheet, name }, or null to remove it:
js
import createFormulon from '@libraz/formulon'

const formulon = await createFormulon()
const wb = formulon.Workbook.createDefault()
try {
  const cache = wb.addPivotCache()
  cache.setWorksheetSource({ range: 'A1:C10', sheet: 'Sheet1' })
  console.log(JSON.stringify(cache.getWorksheetSource().range.rect)) // {"firstRow":0,"firstCol":0,"lastRow":9,"lastCol":2}
  cache.setWorksheetSource(null) // clears the source
  console.log(cache.getWorksheetSource()) // null
} finally {
  wb.dispose()
}
python
from formulon import PivotWorksheetSourceInput, Workbook

with Workbook.create_default() as wb:
    cache = wb.add_pivot_cache()
    cache.set_worksheet_source(PivotWorksheetSourceInput(range="A1:C10", sheet="Sheet1"))
    print(cache.get_worksheet_source().range.rect)  # CellRect(first_row=0, first_col=0, last_row=9, last_col=2)
    cache.set_worksheet_source(None)  # clears the source
    print(cache.get_worksheet_source())  # None

Method shape changes in the guide maps each former call.

Enums ​

A member that stood for "absent" is gone, and the field reads null (Python None) instead. A chart without a legend has legend: null, not ChartLegendPosition.None, and ChartTitleKind.None and ChartAxisCrosses.Absent are gone the same way. Removing such a member renumbers the rest of its enum (ChartLegendPosition, ChartAxisCrosses), so a stored number has to be read back through the enum.

Several enums are renumbered so that the file format's default is 0, and one table now serves a concept that had one per feature.

  • AnchorKind and AnchorEditAs start with Default, and PivotSortOrder starts with Manual.
  • ComparisonOperator is shared by conditional formats, validation and AutoFilter.
  • BlanksAs replaces ChartBlanksAs and SparklineEmptyCells.
  • PivotDatePeriod, whose members are bit flags from seconds to years, replaces PivotDateGrouping.
  • PivotFilterKind replaces PivotFilterType.
  • WorkbookFormat has no Unknown, so Xlsx and Xlsb are 0 and 1.
  • ChartPlotType.Chartex is Extended.

Code that stores the numbers rather than the member names changes meaning, so compare against the members.

Strings that named a closed set (TableTotalsRowFunction, TableStyleElementType, ChartTickLabelPosition, ChartDomain, a custom icon's iconSet) are numbers now, and a string there throws TypeError. ChartInsertKind is removed:

diff
- ws.addChart({ kind: ChartInsertKind.Column, source: 'A1:B5' })
+ ws.addChart({ type: ChartPlotType.Bar, barDirection: ChartBarDirection.Column, range: 'A1:B5' })

Status code changes:

  • StatusCode.SheetIndexOutOfRange and InvalidSheetName moved to 10 and 11, and IndexOutOfRange (13) is new.
  • SheetCountLimitExceeded is retired. A workbook past the sheet cap is SecurityResourceLimit.
  • The codes that no call returned are removed, and ThreadedCommentInvalid is retired.
  • Status 5002, documented as kIoFileTooLarge, is retired too. Every engine ceiling that is not an Excel limit, such as an over-budget input, an oversized archive entry or too many archive parts, is SecurityResourceLimit (6005; Python SecurityError). Only the compression-ratio check stays IoZipBomb.

The new numbers are in Enums.

Result fields ​

An absent value reads null (Python None) on every read, where it used to be -1, an empty string or a value next to a has... flag. A test such as field.axis === -1 is now silently false:

diff
- if (field.axis === -1) placeOnRows(field)
+ if (field.axis === null) placeOnRows(field)
  • A field that holds one rectangle is range and a list of them ranges. rect and ref are gone.
  • A single cell is a CellAddress in a field such as cell or topLeft.
  • A defined name's localSheetId is scope.
  • A fill's fg, bg, fgArgb and bgArgb are foreground and background.
  • Every colour, a border side's included, is one Color record (kind, argb, theme, tint, indexed) in place of ColorSpec.
  • A chart or shape fill or line colour is a DrawingColor: that record as its base, its DrawingML transforms, and the colour Excel renders as resolved (Charts).

The fields that changed are listed under Result fields.

A1 addresses and block access ​

Addresses:

  • Every method with a cell argument takes (row, col) or an A1 string.
  • Every method with a rectangle takes 'A1:B2' as well as a CellRect. A row or column span also takes '2:5' or 'B:D'.
  • A sheet prefix, or a range where one cell is expected, is InvalidArgument.

Block access:

  • Sheet.get and Sheet.set are removed. In Python ws["A1"] and ws[row, col] read and write native values.
  • getValues(range) and setValues(a1, values) move a block in one call, and one list* call replaces every count-and-index pair.
  • A read returns a native value (getTypedValue gives the tagged Value).
  • A string that starts with = written through setValue or ws[...] = is a formula, so text from users goes through setText.

Details: A1 addresses and block access.

Changes on every surface ​

These apply to JavaScript, Python and C alike; the names are the JavaScript ones, and the Python and C names follow the naming rule.

Behaviour that changed without an error ​

Code that ran on 0.18 keeps running, with a different result.

Sheets, views and protection ​
  • Sheet protection flags are allow* and mean the opposite of the 0.18 fields they replace: 0.18's formatCells: 1 protected formatting, and allowFormatCells: false does now. Negate every carried value. The enabled field is gone; setSheetProtection(null) removes the protection.
  • Sheet.move(insertBefore) (Python move, C fm_workbook_move_sheet(wb, from_index, insert_before)) replaces moveSheet(from, to), and its argument is the sheet to insert before, counted in the current order, or null for the end. 0.18's moveSheet(0, 2) on three sheets put the first sheet last; move(2) puts it in the middle. See the example below.
  • A new workbook's first sheet is its selected tab (getView().tabSelected is true); in 0.18 it was false.
  • activeSheet() of a workbook without <bookViews> is the first sheet, not the first tabSelected one, and a load applies Excel's open rule: a hidden active sheet is unhidden, a very hidden one passes activation to the first visible sheet, and an active sheet that is not selected becomes the only selected tab.
js
import createFormulon from '@libraz/formulon'

const formulon = await createFormulon()
using wb = formulon.Workbook.createDefault()
wb.addSheet('B')
wb.addSheet('C')
// 0.18: wb.moveSheet(0, 2) moved Sheet1 to the end.
wb.sheet('Sheet1').move(null)
console.log(wb.listSheets().map((s) => s.name).join(',')) // B,C,Sheet1

const ws = wb.sheet('B')
// 0.18: { formatCells: 0, ... } allowed formatting.
ws.setSheetProtection({ allowFormatCells: true })
console.log(ws.getSheetProtection().allowFormatCells) // true
python
from formulon import SheetProtectionInput, Workbook

with Workbook.create_default() as wb:
    wb.add_sheet("B")
    wb.add_sheet("C")
    # 0.18: wb.move_sheet(0, 2) moved Sheet1 to the end.
    wb["Sheet1"].move(None)
    print(",".join(s.name for s in wb.list_sheets()))  # B,C,Sheet1

    ws = wb["B"]
    # 0.18: SheetProtection(format_cells=False, ...) allowed formatting.
    ws.set_sheet_protection(SheetProtectionInput(allow_format_cells=True))
    print(ws.get_sheet_protection().allow_format_cells)  # True
Cells and formats ​
  • An insert of rows, columns or cells that would push a value, formula, note, fill, border or merge off the sheet fails with PreconditionFailed and changes nothing; 0.18 dropped what fell off.
  • setBlank on a cell without a format of its own removes the cell, so it is no longer listed or counted and getCellXfIndex reads null there; 0.18 kept a blank cell. setRangeXfIndex over whole rows or columns writes row or column formats instead of a blank cell per address, so getCellXfIndex is null there too, and snapshotRangeXfs writes version 2 of its capture, which 0.18 cannot restore.
  • A save renumbers cell format indices the way Excel does: identical formats collapse into one and unused ones are dropped.
    • A workbook saved and reopened can report different getCellXfIndex values for the same cells. The formats they resolve to are unchanged (Cell formats in a saved file).
    • Differential formats are written only when something in the file references them, one record per user, so a reloaded file's dxfIndex values can differ too. The live workbook keeps its indices.
  • Under a Mac profile, column geometry follows Mac Excel: getWidthModel, convertColumnCharsToPt, getCellRectPt, CELL("width") and drawing anchors use the Mac width model and the profile's Normal font, where 0.18 used the Windows model on every profile.
  • A column with a style, an outline level or the hidden flag but no width of its own is now saved at the sheet's default width, without customWidth, and a column whose only state is the default style is not written at all. 0.18 wrote such a column without a width, so Excel could open it hidden at zero width; saving the workbook again with 0.19 writes the width.
  • A font that states no family, charset or scheme is completed when a file is loaded and when setDefaultFont, setFont or addFont receives it, so getFont reports the completed values (a family-less 游ゴシック reads charset 128, and family 3 under a ja profile); 0.18 reported them absent until a save filled them in the written file.
  • A font linked to the theme (scheme minor or major) takes the theme's face for the profile's script (the Latin face under a profile other than ja, ko, zh or th) at load, when it is set, added or patched, when the theme changes and when the profile changes; 0.18 kept and saved the stored name.
    • getFont right after a load reports the theme face, and a record set with a scheme and another name is stored under the theme face.
    • A Japanese book loaded without a profileId reads its theme-linked fonts under the default en_US profile, so pass the profile the book was written for.
  • '' is a literal value in the fields where Excel can store one: setComment with empty text writes a note with empty text (0.18 removed the note; pass null to remove it), a conditional-format text of '' is an empty operand that every non-error cell matches, and a slicer caption of '' takes the column name as an omitted one does.
Conditional formats, validation and sparklines ​
  • A sparkline group without displayEmptyCellsAs in the file reads as zero, as Excel reads it; 0.18 read it as a gap.
  • Inserting rows, columns or cells extends a conditional format or a validation over the inserted cells when it covered the cell just before them in the same column (in the same row for an insert to the right), as Excel does; 0.18 left the inserted cells out. Deletes add nothing, and sparklines, protected ranges, merges and tables do not grow.
  • Opening a file merges its conditional-format rules the way Excel does, so listCfRules() can return fewer rules than the file lists, and rewrites the ranges of each block as Excel opens them, so a rule's ranges can differ from the file's; evaluation results are the same. 0.18 kept every rule and range as stored.
  • Data validation allowBlank, showInputMessage and showErrorMessage default to true, and a new table or pivot takes the workbook's table-style defaults.
  • A conditional-format block holding one data bar or colour scale rule swaps its first two range pieces on every load when the first is a single cell, as Excel does, so a block stored as B2 B3 reads as B3 B2. 0.18 kept the stored order. Blocks of several such rules, icon sets, pivot-scoped blocks and rules carrying extension content keep the stored order.
  • A protected range's security descriptor reads back in the spelling Excel saves (SID aliases upper-cased, the owner, group and DACL sections in that order, rights as tokens), not the text passed in, and a descriptor Excel drops reads back as null (Python None). 0.18 returned the text as given.
Tables and pivots ​
  • Writing text into a table's header cell renames the column, as Excel does; 0.18 left the column name unchanged.
  • A structured reference reads back as Excel's formula bar shows it: =Tbl[[#This Row],[a]] reads back as =Tbl[@a].
  • removeTableStyle moves every table and PivotTable that used the style to the default style of its kind; 0.18 left them naming the removed style.
  • table.update({ totalsRow: true }) grows the table by one row instead of overwriting the last data row, and turning the totals row on fills in Excel's defaults for a table that has never shown it. table.update({ headerRow: false }) deletes the header cells and shrinks the range, where it used to flip the flag only; see Turn the header row off and on.
  • A pivot edit, cache.refresh() or pivot.project() whose report would grow over occupied cells or past the sheet edge is applied and the report is blocked, its anchor showing #SPILL!, where it used to fail or overwrite. A field placed on a pivot axis lists its items at once, and addFieldItem throws AlreadyExists for an item it lists (When a report is blocked).
  • A pivot cache marked refreshOnLoad is refreshed from its source before the loaded workbook is first read, edited, calculated or saved, so its labels and values can differ from the file's records. Deleting the sheet a cache reads keeps the cache and its pivots, and a refresh then fails with PreconditionFailed; 0.18 removed them.
  • A data field added with the name '' keeps an empty caption, as Excel stores it; 0.18 named it from the source field. Omit the name (null, None, NULL) for the derived name.
Charts and pictures ​
  • A cell holding an in-cell picture reads as a value of its own kind, ValueKind.Picture with a pictureId (native reads return an ExcelPicture; Python ValueKind.PICTURE, C FM_VALUE_KIND_PICTURE), and a formula that reads one carries it (=E2, TYPE 128, COUNTA counts it).
    • 0.18 read such a cell as #VALUE!, so a switch over every kind needs the new case.
    • Workbook.getCellPicture(pictureId) (Python get_cell_picture, C fm_workbook_get_cell_picture) reads the image, and formatValue refuses the kind with InvalidArgument (Picture values).
  • A chart line's system and long dash presets read as their own ChartLineDash members, SysDot, SysDash, LgDash, LgDashDot, LgDashDotDot, SysDashDot and SysDashDotDot (5 to 11); 0.18 read them as Other. Code that treats Other as any non-basic dash should test for the new members too.
  • A chart or shape fill or line color reads as a DrawingColor, not the 0.18 ARGB number: read the colour Excel draws from color.resolved.argb and the stored colour from color.base with color.transforms. A Theme colour written with a tint reads back as its lumMod / lumOff transforms.
  • getChart / get_chart names a different call. The 0.18 wb.getChart(sheet, objectId) (Python get_chart(...)) is ws.chart(objectId).getProperties() (Python .get_properties()); ws.getChart() (Python ws.get_chart()) takes no argument and returns a chartsheet's chart handle, or null (None) on any other sheet.
Formula text and entry ​
  • Formula text read back carries a leading = where Excel shows one (getFormulaR1C1, conditional-format and validation formulas, totals-row and calculated-item formulas, getLambdaText). Input accepts the text with or without it.
  • A cell formula loaded from an .xlsx file is respelled as Excel respells it on open: a cell stored as sum(a1) reads back as =SUM(A1) and is saved that way, shared and array formulas included. Cached values are kept. Defined names, conditional-format, data-validation and table column formulas keep the stored text. Code that compared getFormula with the file's raw text sees the respelled form.
  • An entered formula takes the same spelling: function names, references, TRUE / FALSE and error literals are upper-cased and names take their stored spelling, so setFormula('A1', '=sum(b1)') reads back =SUM(B1).
    • A sheet qualifier that names no sheet and no existing link binds an external link to a book of that name, as Excel does: =Nope!A1 adds a link, reads back =[Nope]Nope!A1 and still evaluates to #REF!.
    • Code that counts external links or compares the entered text sees the difference (Formula entry).
  • A stored .xlsx formula that spells a function newer than Excel 2007 without its _xlfn. prefix, as XLOOKUP(...) or let(...), is read as a call to a user-defined function of that name, as Excel 365 reads it: it evaluates to #NAME?, shows as =@XLOOKUP(...) and saves as _xludf.XLOOKUP(...). 0.18 called the built-in function.
    • Cell formulas, defined names, conditional formats and validation formulas are read this way; ANCHORARRAY still reads as the built-in.
    • Code that writes .xlsx files itself should store these functions with the _xlfn. prefix, and with _xlfn._xlws. or _xlpm. where Excel uses them, as Excel does.
  • A 3-D span entered last-to-first reads back in tab order: =SUM(Sheet3:Sheet1!A1) reads =SUM(Sheet1:Sheet3!A1), where 0.18 kept the typed order. The value does not change. Code that compares getFormula output with the text it entered must expect the reordered span.
Defined names ​
  • A defined name bound to a cell or range is read as that reference in aggregating arguments, so text and logical cells behind it are skipped as for the reference written out: with TextCell naming a text cell, MAX(TextCell) is 0 and MIN(TextCell,3) is 3. 0.18 treated the name as a direct argument, returning #VALUE! for text and counting TRUE as 1. A name bound to a constant value is still a direct argument.
  • A defined name loaded from a file with a bare comma-list body, such as Sheet1!$A$1,Sheet1!$B$1, is one reference over both areas. With 4 in A1 and 6 in B1, =SUM(U) over such a name U is 10 and =INDEX(U,1,1,2) is 6; 0.18 kept the name's text but returned #NAME? and #REF!, and setDefinedName refused such a body with status 1000; it now stores it as written.
  • A built-in name typed without its _xlnm. prefix resolves to the built-in: with a print area of A1:B3 on Sheet1, =ROWS(Print_Area) is 3 and is stored as _xlnm.Print_Area, where 0.18 returned #NAME?. The formula text now shows built-in names without the prefix, so a stored =ROWS(_xlnm.Print_Area) reads back as =ROWS(Print_Area); code that parses getFormula output must accept the bare form. =AREAS(NoSuchName) is #NAME?, where 0.18 returned #VALUE!.
  • Formula text around defined names changed; values did not.
    • A sheet-qualified name whose sheet does not define it, such as =Sheet3!wbn for a workbook-scope wbn, is stored as [0]!wbn and read back with the file name in place of [0] once the workbook has a location (setLocation), and as =[0]!wbn before that, where 0.18 kept =Sheet3!wbn.
    • An unresolved built-in name reads back in its canonical spelling, so =ROWS(print_titles) reads =ROWS(Print_Titles).
    • localizeFormula writes built-in names in the locale's spelling: =ROWS(_xlnm.Print_Area) under mac-365-de_DE is =ZEILEN(Druckbereich), where 0.18 gave =ZEILEN(_xlnm.Print_Area).
    • Code that compares formula text must expect these forms.
  • A bare built-in name in a cell formula read from a file now reaches the built-in when the workbook is opened under a profile that spells the name in English, as en_US and ja_JP do: with a built-in Criteria of $A$1:$A$3 on Sheet1, a loaded =ROWS(Criteria) is 3 under ja_JP, where 0.18 returned #NAME? under every profile.
    • Under a profile that spells the name differently, such as de_DE, it stays #NAME? unless a user-defined name has that spelling.
    • canonicalizeFormula now turns a local built-in spelling into the _xlnm. form: =ZEILEN(Druckbereich) in mac-365-de_DE becomes =ROWS(_xlnm.Print_Area), where 0.18 returned =ROWS(Druckbereich).
  • setDefinedName with the profile locale's spelling of a built-in name stores that built-in.
    • With Print_Area under en_US or ja_JP, or Druckbereich under de_DE, a formula naming Sheet2, and Sheet1 active, the name is stored as _xlnm.Print_Area in Sheet1's scope and getPrintArea() on Sheet1 reads it. 0.18 stored the typed name at workbook scope and every sheet's print area read as empty.
    • A new Print_Area or Print_Titles at workbook scope becomes local to the active worksheet whatever sheet its formula names, and stays at workbook scope when a chartsheet is active.
    • With a dialog sheet or macro sheet active, or scoped to a sheet that is not a worksheet, it fails with InvalidArgument.
    • Other built-in names are stored as the built-in in the requested scope.
    • getDefinedName and removeDefinedName find the stored entry by the typed spelling.
    • Code that reads a name back under the name it passed must allow for the new name and scope. resolveDefinedNameKey(input) returns the key a set stores under.
  • Workbook.load(bytes, { profileId }) reads a defined name stored without _xlnm. but spelled as that profile locale's built-in as the built-in, and the formulas naming it follow, unless that built-in is already visible from the name's scope. A workbook-scope Druckbereich loads as _xlnm.Print_Area under de_DE and =ROWS(Druckbereich) reads back =ROWS(Print_Area); under en_US, ja_JP and the default profile it stays an ordinary name. 0.18 kept it an ordinary name under every profile.
  • A loaded workbook keeps its saved values where Excel would: a file saved in Manual mode, and a file saved in Auto mode that carries the calcId the current Excel stamps and no fullCalcOnLoad.
    • Only formulas the file marks for recalculation and formulas without a cached value start dirty.
    • 0.18 marked every loaded formula in both modes, so the first read, save or recalc() recomputed all of them.
    • A file from another Excel version, with no calcId, or with fullCalcOnLoad is still recomputed in full.
  • A reference to deleted cells in another workbook, such as [Book.xlsx]Sheet1!#REF!, reads as the #REF! value the local Sheet1!#REF! is: COUNTA counts it and SUM returns #REF!. 0.18 refused it at entry with a parse error, and a formula holding it in a loaded file evaluated to #NAME?.
  • A stored book-level external [1]!#REF! reads differently. When the link's target is an absolute path such as /data/ExtSource.xlsx, [1]!#REF!, =COUNTA([1]!#REF!) and =ISERROR([1]!#REF!) are #REF!, 1 and TRUE, where 0.18 returned #NAME? in every such cell. For every link the formula text now names a sheet after the file, as Excel saves it: =COUNTA([ShortBook1.xlsx]ShortBook1!#REF!) where 0.18 read =COUNTA(ShortBook1.xlsx!#REF!), and =COUNTA('/data/[ExtSource.xlsx]ExtSource'!#REF!) where 0.18 read =COUNTA('/data/ExtSource.xlsx'!#REF!).
  • A save writes only the external links something in the workbook references, as Excel's save does, wherever an unreferenced link sits, and numbers the survivors again from 1: the link parts and every [n] in formulas and defined names follow the new numbers. 0.18 wrote every loaded link.
    • A link only a defined name references is kept.
    • Content written back as stored and OLE or DDE links keep every link up to the highest number they name, and a workbook with a binary macro or dialog sheet or a formula that does not parse keeps every link.
    • The model keeps every link, so listExternalLinks() is unchanged; only the written file differs, and code that reads [n] from the saved file must expect the new numbers.
  • A loaded workbook numbers its external links by first use, as Excel does on open: defined names, then cell formulas from the active sheet, then the other sheets in tab order. 0.18 kept the file's stored order, so [n] in formula text and bookNumber can differ from the file.
  • After an .xlsb save and reload, a range or 3-D span over an external sheet that the file stores as a failed refresh with no rows reads #REF!, as a single-cell reference to it and an .xlsx round trip already did. 0.18 read such a range as an empty cache.
Function and lookup behaviour ​
  • LEN, MID, FIND, SEARCH and REPLACE count a character outside the Basic Multilingual Plane, such as an emoji, by the workbook's Compatibility Version instead of the profile. New workbooks and files that carry version 2 count it as one position; files that carry no version or version 1 count it as two. Windows profiles, the default win-365-en_US included, used to count it as two everywhere, and Mac profiles as one everywhere.
  • The WORKDAY family (WORKDAY, WORKDAY.INTL, NETWORKDAYS, NETWORKDAYS.INTL) returns one result per element when the start, days or end argument is an array, as =WORKDAY(45292,{1,2}) or =WORKDAY(45292,A1:A2*1); 0.18 returned a single #VALUE! for these. The .INTL weekend argument lifts over an array or a reference. A multi-cell reference in the start, days or end argument, as =WORKDAY(45292,A1:A2), still returns #VALUE!.
  • TAKE and DROP with an array or multi-cell reference as the row or column count return one result per count, each the top-left cell of the slice that count selects, as =TAKE({1,2;3,4},{1;2}) returns {1;1}; an empty slice is #CALC!. 0.18 returned a single #VALUE! for these.
  • In a formula stored without the dynamic-array mark, an array constant, or an operator over one, in an argument that accepts an array is no longer reduced to its first element, so the formula returns what Excel returns, and getFormula shows no @ there. For example, SUM(COUNTIFS(A1:A5,{">","="}&0,B1:B5,{"<","<"}&5)) counts every criteria pair; 0.18 counted only the first and showed @{">","="}&0.
  • The spill operator over a formula that does not spill, as B1# with =1+1 in B1, reads that formula's value as a one-cell region, and ROWS and COLUMNS count it as 1; 0.18 returned #REF! for both. An anchor holding a constant still reads #REF!.
  • A lookup for 0 no longer matches a blank key in VLOOKUP, HLOOKUP or XLOOKUP; in 0.18 =VLOOKUP(0,A1:B3,2,FALSE) and =XLOOKUP(0,A1:A3,B1:B3) returned the row of a blank A1. A blank or omitted lookup value in VLOOKUP, HLOOKUP, MATCH and LOOKUP is the number 0 and finds a 0 key; in 0.18 VLOOKUP with a blank lookup value returned the blank key's row and MATCH(<blank>,A1:A3,0) returned #N/A. XLOOKUP and XMATCH still find a blank key for a blank lookup value.
  • A LAMBDA with an optional parameter saved by Excel, stored as _xlop.b, now loads as [b] and evaluates. 0.18 showed the stored _xlop.b spelling and returned an error on recalculation, #VALUE! or #NAME? depending on the call.
  • SHEET over a structured table reference, such as SHEET(Table1[]) or SHEET(Table1[Feb]), returns the number of the sheet holding the table, as Excel does; 0.18 returned #VALUE!. SHEETS over a table reference was already 1.
  • LOOKUP with an array lookup value, such as =LOOKUP({100;5},A1:A3,B1:B3), searches each element on its own and spills one result per element, as VLOOKUP already did; 0.18 returned a single #N/A.
  • When several arguments of a function fail, the result is the error of the first argument the function checks, as in Excel: =FLOOR("x",1/0) is #VALUE! for the text. 0.18 reported an error argument ahead of any text that fails to coerce, wherever it sat, so the same formula gave #DIV/0!. From the other side, with #N/A in A1, =SORT(A1,"x") now returns the data cell's #N/A, where 0.18 returned #VALUE! for the option; UNIQUE and EXPAND changed the same way.
  • GCD, LCM, MULTINOMIAL, IMSUM, IMPRODUCT and CONCAT return #VALUE! for a parenthesised union such as (A1:A2,C1:C2). 0.18 read every area, so with 4, 6 in A1:A2 and 8, 10 in C1:C2, =GCD((A1:A2,C1:C2)) gave 2 and =CONCAT((A1:A2,C1:C2)) gave "46810". SUM, COUNT and AND still read every area, and they now read a union returned by LET the same way: with 4 in A1 and 6 in B1, =SUM(LET(u,(A1,B1),u)) is 10, where 0.18 returned #VALUE!.
  • A logical value in a matrix operand and an empty or missing TEXTSPLIT delimiter, which 0.18 let through, now return #VALUE!. With TRUE in A1, numbers in B1:B2 and A2, and an identity matrix in G1:H2, =MMULT(A1:B2,G1:H2) is #VALUE!, where 0.18 read TRUE as 1 and spilled the input; the same holds for MINVERSE, MDETERM, LINEST, LOGEST, TREND and GROWTH over a range holding a logical value. =TEXTSPLIT("a,b","") and =TEXTSPLIT("a,b",) are #VALUE!, where 0.18 returned a,b unsplit.
  • CELL("contents") of a blank cell is a blank: with A1 empty, =ISBLANK(CELL("contents",A1)) is TRUE, =LEN(CELL("contents",A1)) is 0 and =CELL("contents",A1)&"" is "", where 0.18 returned FALSE, 1 and "0". The formula alone still shows 0.
  • COUNTBLANK over a reference into a closed workbook counts the cells the link cache holds no value for: with only S!A1 cached, =COUNTBLANK([1]S!A1:A5) is 4, where 0.18 returned #VALUE! for a single external cell, a range and a whole column alike. COUNTIF and the other *IF functions there still return #VALUE!.
  • A structured table reference is a reference wherever a plain range is.
    • =@Table1[Qty] intersects the formula's row, as @ over the range does: on a row beside the table it reads that row's value, and on a row outside the table it returns #VALUE!. 0.18 returned the column's first value on any row. The same holds for a table reference bound with LET or passed through TAKE.
    • OFFSET takes a table reference as its base, and AREAS, CELL and ISFORMULA read the reference's range: =AREAS(Table1[Qty]) is 1, =CELL("address",Table1[Qty]) is the first cell's address, and =SUM(OFFSET(Table1[Qty],1,0)) sums the shifted range; 0.18 returned #VALUE! for these and for ISFORMULA.
    • N, T and ISREF over a table reference are unchanged.
  • LET, a lambda call and @ can form an endpoint of :, each read as the reference it returns, and a formula that is only such a range spills the cells it covers. 0.18 refused =A9:LET(a,A2:A4,a) with ParserUnexpectedToken (status 1000).

Calls that are now refused ​

Each of these succeeded in 0.18 and now throws without changing the workbook.

  • addMerge on a range that overlaps a merge (AlreadyExists), or a table, pivot, array formula or data table (PreconditionFailed).

  • addChart with a title of ''.

  • addTable over another table or a PivotTable (PreconditionFailed).

  • addTable with a name that reads as a cell address, such as A1, and addTable or a style update naming a custom style whose table / pivot flags exclude that kind (InvalidArgument).

  • updateFormatDefaults with a default column width above 255, a default row height above 409.6 points, or a base column width that is fractional or above 255 (InvalidArgument).

  • addProtectedRange / updateProtectedRange with a name that is empty or longer than 255 UTF-16 units, or more than 8,191 rectangles (InvalidArgument).

  • addSparklineGroup / updateSparklineGroup with a source or date range that is not one reference or defined name, such as a union (InvalidArgument).

  • Setters given a value beyond Excel's limits: a row height above 409 points, a column width above 255 characters, cell text over 32,767 characters (InvalidArgument).

  • A name added, renamed or copied into any named collection that equals an existing one under Excel's text comparison, which folds letter case, full- and half-width forms and hiragana / katakana: Budget and BUDGET collide, and so do データ and データ (AlreadyExists). addSheet() without a name takes the smallest free number, Sheet2, Tabelle2 and so on.

  • An .xlsb save of a feature the binary records cannot hold fails with the new IoFeatureNotWritable (5028; Python IoError) and writes nothing, where 0.18 saved the workbook without it. The error context's kind= names the feature. The features:

    • A protected range with a descriptor, name or ranges the records cannot hold.
    • A sparkline source that is not one reference or name.
    • A PivotTable or pivot cache the records cannot state.
    • Rich-value metadata kept as stored that does not convert, which also stops an .xlsx save of a book read from .xlsb.
    • setCellPicture on a workbook that keeps its rich values as stored fails the same way (.xlsb saves that fail).
  • addCfRule with an id the sheet already holds, compared without regard to case (AlreadyExists); 0.18 kept the duplicate id on both rules. A colour-scale threshold of type AutoMin or AutoMax in addCfRule or updateCfRule (InvalidArgument), and an .xlsx save of a rule that carries one; they are data-bar types.

  • A chart or shape fill or line colour given without its kind (TypeError); 0.18 dropped it.

  • setCellStyle on a built-in style with a record that carries a different builtinId (AlreadyExists).

  • Pivot.updateField with a sortByField that names no value field (NotFound, where 0.18 sorted by label), and setFieldDateGroup on a field whose values are plain numbers rather than dates (PreconditionFailed).

  • Formulas Excel refuses to enter, in cells, defined names, conditional formats and validations, fail with a parser status and parseError:

    • LARGE, SMALL, PERCENTILE, PERCENTILE.INC, PERCENTILE.EXC, QUARTILE, QUARTILE.INC, QUARTILE.EXC, TRIMMEAN and FVSCHEDULE with other than two arguments.
    • Other argument counts and reference-only arguments Excel refuses (=ABS(1,2), =COUNTIF(1,1)).
    • A typed ANCHORARRAY(...) call with or without _xlfn. (B1# is the spelling).
    • The error literals #CALC!, #SPILL!, #CONNECT!, #BLOCKED!, #BUSY!, #FIELD! and #UNKNOWN!.

    Pass the data of the two-argument functions as one range or array constant: =LARGE(A1,A2,3) becomes =LARGE(A1:A2,3). A formula already stored in a file still loads, and setError still writes the newer errors.

  • A call that returns a value rather than a reference as an endpoint of :: =A9:IFERROR(A2:A4,0) and =SORT(A2:A4):A9 fail with ParserInvalidReference (1004). A file that stores one keeps it, and it evaluates to #VALUE!. 0.18 accepted both with status 0 and the cell evaluated to an error.

  • A typed reference into another workbook whose sheet name, or either end of whose span, runs past 31 UTF-16 units (ParserInvalidReference, in a cell, defined name, conditional format or data validation). 0.18 stored it as typed and evaluated it to #REF!. A formula loaded from a file keeps such a name unchanged.

  • A typed formula whose cell or range reference names a chartsheet, such as =Chart1!A1 or =SUM(Chart1!A1:B2) (ParserInvalidReference, in a cell, defined name, conditional format or data validation). 0.18 accepted it and evaluated it to 0.

  • Most sheet calls on a sheet that is not a worksheet (InvalidArgument, Python InvalidArgumentError, naming its kind).

    • 0.18 answered every call there: on a chartsheet or dialog sheet a cell read gave a blank, a cell write was accepted, read back and saved, and the print area read as empty.
    • 0.19 refuses cell reads and writes and the other worksheet calls.
    • A chartsheet answers what its own part stores (its view, tab colour, page setup, margins, header and footer, protection and chart) and returns its lists of worksheet content empty. Charts lists which of its setters apply.
    • kind, getVisibility and setVisibility work on every sheet, so code that walks every sheet should check ws.kind first.
    • In the CLI, paginate on a chartsheet fails with a message that it needs a worksheet, where 0.18 exited 0 with zero pages.
  • A view change on a sheet that is not a worksheet (InvalidArgument), except a chartsheet's zoom and selected tab; a patch restating the reported view is accepted and changes nothing.

    • On a dialog sheet, macro sheet or other sheet, reading the view is refused too.
    • 0.18 read a chartsheet's or dialog sheet's view as worksheet defaults (zoom 100, not the file's), and setSheetZoom returned ok and read back the new zoom; on a chartsheet the change was dropped at save.
    • 0.19 reads a chartsheet's zoom from the file and saves a zoom change, ending zoom-to-fit.
  • addDataField / setDataField (Python add_data_field / set_data_field, C fm_sheet_add_pivot_data_field / fm_sheet_set_pivot_data_field) with a name that repeats another data field's name or a field's source or custom name (AlreadyExists); 0.18 stored it. An empty or blank caption counts as a name, and a data field may keep its own caption.

  • '' where 0.18 read it as absent (InvalidArgument): a hyperlink target (0.18's form for an in-workbook link; pass null with a location), a validation formula1 / formula2, a sheet, workbook or protected-range hash string, a threaded comment's parent id, and a conditional-format rule's formula1 (0.18 filled a text rule's formula from it as from null). Omit the field or pass null (Python None).

  • '' in the six sheet XML setters (AutoFilter, page setup, page margins, print options, header/footer, sheetPr), where 0.18 removed the element, and for a chart series patch's name, categories or x, where 0.18 removed the reference (InvalidArgument). Pass null (Python None, C NULL) to remove it.

  • '' in every other field where it is not a value Excel can store (InvalidArgument), among them:

    • A defined name's formula (0.18 removed the name; call removeDefinedName).
    • Table, pivot, slicer and default style names, picture, chart and shape names, a pivot name, a sparkline group's dateAxisRange, totals-row labels and formulas, and pivot cache worksheet sources.
    • Python 0.18 sent "" as None for most fields and defaulted many of them to "", so code that relied on those defaults now fails the same way.

    The guide's Empty strings table lists every field with its 0.18 and current meaning.

  • A string with a lone UTF-16 surrogate, in an argument or a record field (BindingUtf8EncodingError, 7002); 0.18 stored U+FFFD in its place. In Python a surrogate pair written as two code points is refused too. In JavaScript a string argument or field takes a string only, so an ArrayBuffer or a one-byte typed array is TypeError, and in both bindings a range argument that is neither an A1 string nor a CellRect is TypeError.

The other way round, addTable names a blank or repeated header Column1, Column2 and so on, where 0.18 refused it, and setRangeXfIndex accepts a rectangle of up to 134,217,728 cells, where 0.18 failed with PreconditionFailed above 1,048,576; past that, a rectangle that is not whole rows or columns is SecurityResourceLimit.

Status codes ​

  • A name or id that is taken throws AlreadyExists, a refusal that depends on the workbook's state throws PreconditionFailed, and an unknown object id is NotFound. A negative or past-the-end position is IndexOutOfRange (SheetIndexOutOfRange for a sheet).

  • A formula that does not parse fails with a parser status (1000 to 1014) and a parseError position.

  • A conditional-format rule's, colour filter's, sort condition's or custom table style element's dxfIndex past the differential-format table is IndexOutOfRange; 0.18 returned InvalidArgument for a table style element, and the AutoFilter setters accepted the index and wrote a dangling id.

  • A chart series with more points than an Excel column holds is InvalidArgument; 0.18 returned SecurityResourceLimit.

  • These engine ceilings return SecurityResourceLimit (6005, Python SecurityError) with a part=<name> requested=<n> limit=<n> context:

    • A page grid over 2^24 pages (0.18: status 9005, now retired).
    • A PivotTable result over its cell limit (0.18: FunctionOverflow).
    • A workbook past the sheet cap (0.18: status 5053, now retired).
    • getValues and getTypedValues over 4,194,304 cells and a thread count above 8 (0.18: InvalidArgument).
    • A raw print-settings XML fragment over its size limit (0.18: PreconditionFailed).
    • A drawing edit past the reader's part or size limits (0.18: InvalidArgument).
    • An .xlsb array constant of more than 65,536 elements (0.18: a corrupt-file status).
    • A picture over 32 MiB, a sparkline group of more than 65,536 sparklines, more than 16,384 ranges in one call and more than 1,024 gradient stops in a fill.

    Engine ceilings lists every part. More than 1,026 manual page breaks on an axis is InvalidArgument, an Excel limit; 0.18 returned PreconditionFailed.

  • Removing the only sheet is PreconditionFailed (9); 0.18 returned status 5052 (CannotRemoveLastSheet), which is retired.

  • The statuses 7004 (BindingWasmInitFailed) and 7005 to 7007 (CliInvalidArgs, CliFileNotFound, CliOutputFailed) are removed with the other codes no call returned, and the numbers stay unused. The command line reports these conditions through its exit statuses.

Function results ​

  • GROUPBY and PIVOTBY with a total_depth of 2 or more over a single key column return #VALUE!, as Excel does; 0.18 returned a result.
  • A union that contains a 3-D reference, such as SUM((Sheet1:Sheet2!A1,B1)), returns #NAME?; 0.18 returned a number.

JavaScript and TypeScript ​

Behaviour that changed without an error ​

  • wb.activeSheet() returns the Sheet, not its index, and wb.sheetCount is a property; wb.sheetCount() and arithmetic on activeSheet() fail at run time, not at compile time in plain JavaScript.
  • ThreadedComment.created reads a CivilTime record (or null) instead of an ISO string, and ThreadedCommentInput.created takes a Date or a CivilTime, read as UTC.

Removed and renamed ​

  • createFormulon() resolves to the Formulon object in both packages; Workbook.loadBytes(bytes) is Workbook.load(bytes), saveAs(format) is save(format), and excelProfileId() / setExcelProfileId() are getProfileId() / setProfileId().
  • The declarations need TypeScript 5.7 or later.
  • Removed with no replacement under the old name: CfColor, the *Argb colour keys and fillRgb / lineRgb (colours are one Color record), the enums FilterOperator, ChartBlanksAs, SparklineEmptyCells and PivotFilterValueKind, the todaySerial argument of evaluateCfRange (pass { today }), EvalArrayResult and DrawingObject.mediaPath. DatePeriod (the conditional-format date period, not the PivotTable's PivotDatePeriod), BlanksAs and ComparisonOperator each replace several per-feature enums and are renumbered.
  • The engine-level functions are members of the Formulon object in both packages, and the module-level exports of @libraz/formulon-native are gone: evalFormula(formula) is formulon.evaluateFormula(formula), version() and versionString() are formulon.getVersion(), statusString(code) is enumName(StatusCode, code), errorDisplayName(code) is ErrorDisplayName[code], and lastErrorMessage() and lastErrorContext() are the message and context of the caught FormulonError. setLogMinLevel and setLogSink are on Formulon, and the sink receives a LogEvent object where 0.18 passed the encoded record bytes.
  • Workbook.delete() (WebAssembly package) is dispose(), which both packages have and which using wb = ... calls for you. Workbook.isValid() is the property disposed, with the opposite sense: wb.isValid() becomes !wb.disposed.

Reshaped records ​

  • Chart series are keyed by seriesId, pivot filters carry value / valueHigh, an AutoFilter custom filter lists its conditions, and CfMatch is a union told apart by kind.
  • A theme script font takes scheme in place of major, and table and pivot styles are read and written with getStyleOptions() / updateStyleOptions(patch).
  • paginate(sheet) is ws.getPagination() and PaginationResult is Pagination: horizontalBreaks and verticalBreaks are rowBreaks and columnBreaks (records with manual, so horizontalBreakManual and verticalBreakManual are gone), scale is scalePct, printTitles is PrintTitles | null, printArea holds CellRect records, and status is gone because a failure throws. PaginationPage carries range in place of firstRow, lastRow, firstCol and lastCol, and RectPt.width / height are widthPt / heightPt.
  • Page margins are in inches: PaginationMargins.leftIn is the old left (points) divided by 72, and the same for the other five sides.
  • TableEntry.headerRowCount and totalsRowCount (numbers) are TableProperties.headerRow and totalsRow (booleans), and TableUpdateInput is TablePatch. ChartDataSource.kind is the number ChartSourceKind, not 'none', 'ref' or 'literal', so kind === 'ref' is now silently false; compare with ChartSourceKind.Ref.
  • getCellsInRange(range, { cursor, limit }) and getInvalidCells({ cursor, limit }) take a PageOptions object in place of positional cursor and limit.

Python ​

Everything under Changes on every surface applies, with snake_case names.

Behaviour that changed without an error ​

  • NOW(), TODAY() and every unpinned clock read use local time; 0.18 read UTC, so a program that compensated for the offset now gets it twice.
  • Phonetic-run and mention positions count code points; 0.18 counted UTF-16 units, so a position after an emoji moves.
  • wb.active_sheet() returns the Sheet, not its index, and len(wb) replaces sheet_count().

Removed and renamed ​

  • Python 3.10 or later is required (0.18 ran on 3.9).
  • Value.to_python() is gone (reads return native values), and ColorScale, DataBar and IconSet are gone: a rule is written with CfColorScaleInput, CfDataBarInput and CfIconSetInput and read back as CfColorScale, CfDataBar and CfIconSet.
  • A cell is addressed positionally, (row, col) or one A1 string; row= and col= keyword arguments raise TypeError.
  • Failures raise one FormulonError subclass per status range, and FormulaSyntaxError is a FormulonError and ValueError but not an InvalidArgumentError; parse_reference raises instead of returning None.
  • The submodules formulon.workbook and formulon.metadata are gone, and so is the stub file formulon/__init__.pyi: the package carries inline annotations and py.typed. Import every name from formulon itself (from formulon import Workbook, Sheet).
  • formulon.LIB is no longer re-exported. The two engine calls that needed it are module-level functions: formulon.get_version() and formulon.set_log_min_level(level).
  • Workbook.save_as(fmt) is Workbook.save(format=fmt). save() also takes a destination: omitted, it returns bytes; a path or a binary file object receives the archive and save returns None. A path ending in .xlsx or .xlsb picks the container, and any other extension needs format=.
  • Workbook.is_valid is Workbook.closed, a property with the opposite sense: if wb.is_valid: becomes if not wb.closed:.
  • Workbook.iter_passthrough() and PassthroughPart are gone; wb.ooxml.list_passthroughs() returns the part paths as a list of str.
  • These functions and methods are removed: eval_formula() is evaluate_formula(), library_version() is get_version(), get_theme() and Theme are get_theme_colors() and get_theme_fonts(), and error_display_name(), Workbook.add_batch() with StyleBatchIndices, iter_cells() and iter_tables() have no replacement under that name. Use Sheet.list_cells() or Sheet.iter_rows() for cells, Sheet.list_tables() for tables, and add_font / add_cell_xf for styles.
  • Sheet, Table, Pivot, PivotCache, Chart, Picture, Shape, Slicer, SheetOoxml and WorkbookOoxml cannot be constructed; a direct call raises TypeError, and copy.copy, copy.deepcopy and pickling of any handle or workbook raise TypeError too. Get a handle from the workbook, and move a workbook between processes with Workbook.load(wb.save()). Table, Shape and Slicer were records in 0.18 and are handles now: read their fields with get_properties().

Reshaped records ​

  • Results that were tuples are frozen dataclasses, so tuple unpacking fails: get_sheet_selection, get_print_titles, the table-style defaults and the pivot grand totals among them.
  • ErrorName is LocaleErrorName, MarginsPt is PaginationMargins, PageLayout is PaginationPage and PaperInfo is PaginationPaper. paginate(sheet) is ws.get_pagination(), and its PaginationResult is Pagination: horizontal_breaks and vertical_breaks are row_breaks and column_breaks, lists of RowBreak and ColumnBreak records with a manual flag (the parallel *_break_manual lists are gone), scale is scale_pct, print_titles is PrintTitles or None, and RectPt.width / height are width_pt / height_pt. A page is PaginationPage.range, a CellRect, in place of four row and column fields.
  • Page margins are in inches, not points: PaginationMargins.left_in is the old MarginsPt.left divided by 72, and the same for right, top, bottom, header and footer. Code that still reads them as points gets values 72 times too small.
  • TableProperties.header_row_count and totals_row_count (integers) are header_row and totals_row (booleans), and ChartDataSource.kind is the ChartSourceKind IntEnum (NONE, REF, LITERAL), not "none", "ref" or "literal"; a comparison with the old string is now silently false.
  • The optional parameters of many methods are keyword-only, among them Chart.update_legend, Pivot.add_field_item, Table.update and Workbook.update_iterative. A partial update takes keyword-only arguments that default to UNCHANGED, and None clears a key that can be cleared. A method that takes a record takes a dataclass (HyperlinkInput, TableInput, SheetSelection):
diff
- wb.set_iterative(True, 100, 0.001)
+ wb.update_iterative(enabled=True, max_iterations=100, max_change=0.001)

The guide's table of keyword-only parameters lists each method.

C ​

A C caller recompiles. Every record starts with uint32_t struct_size, set by FM_STRUCT_INIT(T) (fm_struct_init<T>() in C++). Every sheet function takes size_t sheet_index, a count getter writes the count through an out-parameter, input records go by const pointer, and an optional read reports out_present. Records are named by role: _spec_t is input, _info_t output, _t both and _patch_t a partial update whose fields carry an fm_patch_op_t. One fm_cell_rect_t replaces the per-feature range records, enum constants start with their type name, and every function that returns a pointer states how long it stays valid:

diff
- fm_workbook_insert_rows(wb, sheet, row, count);
+ fm_sheet_insert_rows(wb, sheet_index, first, last);

Behaviour that changed under the same name ​

  • fm_sheet_get_comment_at(wb, sheet_index, index, out) reads the note at a position; in 0.18 it took a row and column. The cell lookup is fm_sheet_get_comment.
  • fm_workbook_load(bytes, len, spec, out) takes a const fm_load_options_spec_t* before the out-parameter; pass NULL for the defaults.
  • fm_workbook_set_defined_name takes an fm_defined_name_t record, and an empty formula is FM_STATUS_INVALID_ARGUMENT instead of a removal.
  • fm_workbook_add_sheet takes an insert_before position and returns the new index; fm_workbook_move_sheet's second argument is insert_before, not the final index.
  • fm_sheet_set_row_outline takes a first, last span and a uint32_t level, and fm_sheet_set_column_outline a uint32_t level; a level above 7 is FM_STATUS_INVALID_ARGUMENT.
  • fm_sheet_set_range_xf_index and fm_sheet_remap_range_xfs return FM_STATUS_SECURITY_RESOURCE_LIMIT where 0.18 returned FM_STATUS_PRECONDITION_FAILED. fm_sheet_get_cell_count and fm_sheet_get_cell_at count and list a blank cell only while it has a format of its own, and list a coordinate that has only a format as a blank value with a NULL formula.
  • An absent string in a result record reads NULL instead of "".

Removed and renamed ​

BeforeAfterNote
fm_workbook_save_as, FM_WORKBOOK_FORMAT_UNKNOWNfm_workbook_savefm_workbook_save takes the format.
fm_workbook_evaluate_formulanonefm_sheet_evaluate_formula_array returns a scalar as a 1 by 1 array.
fm_sheet_set_zoomfm_sheet_update_viewA zoom outside 10 to 400 is FM_STATUS_INVALID_ARGUMENT instead of being clamped.
fm_sheet_get_imagefm_sheet_get_pictureReports a missing picture as FM_STATUS_OK with *out_present = 0.
fm_formula_localize, fm_formula_canonicalizefm_localize_formula, fm_canonicalize_formulaTake an fm_reference_notation_spec_t.
fm_sheet_add_hyperlinkfm_sheet_set_hyperlink(wb, sheet_index, hl)No cell arguments and no NULL form. fm_sheet_remove_hyperlink(wb, sheet_index, range) takes a rectangle.
fm_text_compare, fm_collation_classesfm_compare_text, fm_get_collation_classesTake the strength before the profile id.
fm_workbook_pivot_field_set_date_groupfm_sheet_set_pivot_field_date_groupTakes a mask of periods.
fm_sheet_set_chart_displayfm_sheet_update_chart_displayTakes a patch.
fm_workbook_set_cell_phonetic_runsfm_sheet_set_cell_phonetic_runsTakes an fm_text_offset_unit_t before the runs; fm_sheet_add_threaded_comment takes one too.
fm_status_string(status)fm_get_status_name(status)Both return a static string.
fm_sheet_set_freeze, _set_split, _set_top_left, _set_pane_top_left, _set_view_mode, _set_show_grid_lines, _set_show_formulas, _set_show_zeros, _set_show_outline_symbols, _set_show_row_col_headers, _set_right_to_left, _set_tab_selectedfm_sheet_update_viewThe single-property view setters are removed: fill an fm_sheet_view_patch_t (each field with its _op) and call fm_sheet_update_view.
fm_sheet_set_tab_hiddenfm_sheet_set_visibilityTakes the whole tab state (visible, hidden or very hidden).
fm_workbook_clear_pinned_now(wb)fm_workbook_set_pinned_now(wb, NULL)
fm_workbook_paginatefm_sheet_paginate
fm_pagination_horizontal_break_*, fm_pagination_vertical_break_*, with their _is_manual readersfm_pagination_get_row_break_count / _at, fm_pagination_get_column_break_count / _atFill an fm_row_break_t or fm_column_break_t whose manual field carries the flag.

Reshaped records ​

  • fm_color_t replaces fm_cf_color_t and the *_argb fields of the label font records, and the chart fill and line records (fm_chart_fill_t, fm_chart_line_t and their patches) carry an fm_drawing_color_t as color, so every record embedding one changes layout. The shape fields fill_rgb / line_rgb are fill / line.
  • fm_sheet_get_print_area fills fm_cell_rect_t records and fm_sheet_get_print_titles an fm_print_titles_t, instead of A1 text.
  • fm_sheet_update_protected_range addresses the range by name and takes a patch; ranges left NULL keeps the stored ranges.
  • fm_pagination_margins filled an fm_margins_pt in points; fm_pagination_get_margins fills an fm_margins_pt_info_t in inches (left_in, right_in, top_in, bottom_in, header_in, footer_in). Divide an old value by 72 to compare.
  • fm_workbook_save and fm_workbook_save_with_diagnostics take a non-const fm_workbook_t *, because a save changes the workbook: it computes pending values, recalculates a manual workbook that has calcOnSave set, and writes stale PivotTables into their cells before anything is written. A failed write keeps those changes, and a retry writes the same bytes. C callers compile unchanged; a C++ caller that holds only a const fm_workbook_t * needs a non-const pointer.

Collisions and state conflicts return FM_STATUS_ALREADY_EXISTS and FM_STATUS_PRECONDITION_FAILED. C ABI changes lists each function and record.

Command line ​

  • Exit statuses are fixed: 0 success, 1 a request the engine refused, 64 a usage error, 65 a formula that does not parse in eval, 66 an input file that cannot be read and 73 / 74 an output or stream error. 0.18 exited 1 for all of these but usage errors, so a script that tests for 1 misses them.
  • --formulas, --values, --sheets and --metadata are removed and exit 64; dump takes one --view option:
diff
- formulon dump --values book.xlsx
+ formulon dump --view values book.xlsx
  • Every --json output is an object with "format": 1, the paginate keys changed, dump --view metadata writes definedNames and passthroughParts in camelCase, and recalc --json writes its warnings to standard output instead of standard error.
  • formulon --version prints formulon <version>, an input named - reads standard input and -o - writes standard output, and recalc -o picks the format from .xlsx or .xlsb (or --format).

See Command line for every output key that changed.

What was added ​

  • Workbook.load(bytes, { profileId }) (Python Workbook.load(source, profile_id=...), C fm_load_options_spec_t.profile_id) loads a workbook under a profile without making any formula stale, and the CLI applies --profile when it loads the file (Workbook lifecycle).
  • A JavaScript Date and a Python date, datetime or time can be written to a cell. Written to a General cell, a Date takes the built-in short date (id 14, m/d/yy under en-US) at local midnight and the date and time (id 22) otherwise; a Python date takes 14, a datetime 22 and a time h:mm:ss (21).
  • Sheet.insertCells(range, shift) and deleteCells(range, shift) (Python insert_cells, delete_cells; C fm_sheet_insert_cells, fm_sheet_delete_cells) move the cells of a band with a CellShift: Down or Right insert, Up or Left delete. A whole-row or whole-column range behaves as insertRows or insertColumns. A shift that does not fit the call, or that cuts into a table, legacy array block, data table or PivotTable, is InvalidArgument or PreconditionFailed and leaves the workbook unchanged.
  • ws.listCircularReferences() and ws.isCellStale(row, col) (Python list_circular_references, is_cell_stale; C fm_sheet_get_circular_reference_count / _at, fm_sheet_is_cell_stale) list the cells of an unresolved cycle and tell whether a formula cell holds an outdated value under manual calculation (Recalculation).
  • wb.getCompatibilityVersion() / setCompatibilityVersion(version) (Python get_compatibility_version, set_compatibility_version; C fm_workbook_get_compatibility_version, fm_workbook_set_compatibility_version) read and set Excel's Compatibility Version, saved in .xlsx and .xlsb.
  • .xlsb saves write print settings, AutoFilters, notes and threaded comments, and custom table styles from the workbook (XLSB).
  • PivotTables and their caches in an .xlsb file are read into the model, so they can be inspected, edited and refreshed, and an .xlsb save writes them from it; a PivotTable with a feature the engine does not write to .xlsb yet is left out with its cache and reported (PivotTables). wb.ooxml.listPassthroughs() lists only the parts the model does not hold.
  • getValues(range) returns a dense grid with Blank for empty cells, and setValues(a1, values) writes one. hasDirtyCells() (Python has_dirty_cells()) reports edits made since the last full recalc.
  • A table, pivot, conditional-format rule, validation or protected range is addressed by position or by key (removeTable('Sales'), removePivot('Pivot1')).
  • Pivot.getSpill() (Python get_spill; C fm_sheet_get_pivot_spill) reads the range a pivot report covers, or needs when blocked, and Sheet.getSpill reports it at the report's anchor.
  • Spill.anchor (C fm_spill_info_t.anchor) is the cell holding the dynamic-array formula, or a PivotTable report's anchor cell.
  • Spill.cause (C fm_spill_info_t.cause) says what blocks a spill or a pivot report: SpillCause.Occupied, Merged or BeyondEdge, and null when nothing does. A spill or report blocked past the sheet edge is now reported, its range clipped to the grid.
  • Saved XLSX and XLSB files carry Excel's rich error values for #SPILL!, #CALC! and a #VALUE! with a reason, and loading reads them back, so a blocked spill or pivot report stays blocked across a save (File formats).
  • Pivot.getPageFieldOrder() and setPageFieldOrder(indices) (Python get_page_field_order, set_page_field_order; C fm_sheet_get_pivot_page_field_order, fm_sheet_set_pivot_page_field_order) read and write the page-axis order; the Values level is InvalidArgument there.
  • wb.getLocation() / setLocation(location) (Python get_location, set_location; C fm_workbook_get_location, fm_workbook_set_location) hold where the workbook is saved, a WorkbookLocation with directory and fileName. It drives CELL("filename"), CELL("address") for other sheets and the Book.xlsx!Name spelling (Formula language).
  • ReferenceNotationOptions { r1c1, baseRow, baseCol } (Python r1c1=, base_row=, base_col=; C fm_reference_notation_spec_t) is the one options type of parseReference, localizeFormula and canonicalizeFormula.
  • ws.ooxml.listCellXfIndices(range?) and ws.listShowPhoneticCells(range?) (Python list_cell_xf_indices, list_show_phonetic_cells) list the stored cells with a cell XF or the Show Phonetic flag, blanks included. Their C functions, fm_sheet_get_cell_xf_indices and fm_sheet_get_show_phonetic_cells, take a required range; pass the whole grid to list every stored cell.
  • FormulonOptions.wasm takes the module bytes or a WebAssembly.Module, for Workers and other hosts that cannot locate formulon.wasm.
  • convertCivilToSerial and convertSerialToCivil (Python convert_civil_to_serial and convert_serial_to_civil) convert between a calendar date and time and an Excel serial, for either date system.
  • Every drawing has update(patch) for its name, description, hidden flag and anchor; Picture, Chart and Shape have setZOrder and snapshot, and Slicer has setZOrder.
  • wb.sheetCount, wb.hasSheet(ref), formulon.listProfileIds(), wb.listThemeScriptFonts(scheme), ws.getVisibility() / setVisibility(), ws.updateValidation() / updateCfRule(), pivot.getField() / getDataField() / getFilter(), cache.getRecordValue(), ooxml.setFill() / setBorder() / setCellXf() / setDxf() and, in C, fm_sheet_set_value.
  • getCellRectPt and getWidthModel take an optional mode that defaults to GeometryMode.Display.
  • getTypedValue, getDate, getUsedRange, iterRows, getTabColor, setTabColor, enumName and the ExcelError class in JavaScript, and the Python equivalents; a Workbook iterates its sheets, and getMemoryUsage is on the WebAssembly package as on the native one.
  • eval - reads a formula from standard input, eval --in FILE evaluates against a workbook, dump --range A1:B2 limits the dump, and --local accepts localized formula text.
  • A WASM Workbook you forget to dispose may now be released at garbage collection, as the native package already does. See API conventions.