Repository navigation
v0.17.0
Formulas: the functions of Excel and Google Sheets, LET and LAMBDA, dynamic arrays, defined names, tables. The engine computed 134 of the 568 functions the two help centers list; it computes 543. The 25 left ask a service or the application itself (IMPORTRANGE, STOCKHISTORY, CUBEVALUE, RTD …). docs/formula-coverage.md lists them, and what a function does not do as its application does.
Spreadsheets: functions
- 409 functions more. Financial (55:
PMT,IRR,XIRR,NPV,PRICE,YIELD, the coupon and depreciation functions …), engineering (57: number bases, bits, complex numbers,CONVERT,ERF, Bessel), statistical (the distributions and their inverses, tests, regression:LINEST,TREND,FORECAST.ETS), database (DSUM,DGET…), trigonometry,SUBTOTALandAGGREGATE(hidden and filtered rows left out), text (TEXTSPLIT,TEXTBEFORE,TEXTAFTER, theREGEX…functions,NUMBERVALUE,FIXED,DOLLAR), dates (WORKDAY,NETWORKDAYS.INTL,YEARFRAC,WEEKNUM,DATEVALUE), lookup and information (XMATCH,ADDRESS,CELL,FORMULATEXT,GETPIVOTDATAover the pivot tables a file shows), and those only Google Sheets has (QUERY,SPLIT,SORTN,FLATTEN,ISBETWEEN, the operators as functions). - A formula using one of them kept the value the file held, which no longer followed its cells, and showed
#NAME?when typed. They are computed, and the editor suggests them with their arguments. - Checked against the worked examples of Microsoft's help pages: 937 examples of 428 pages.
bun scripts/formula-coverage.tswrites the coverage report from the function lists of the two help centers (--refreshdownloads them again).
Spreadsheets: LET, LAMBDA, dynamic arrays
LETandLAMBDA: names for values inside a formula, functions made of formulas, with optional parameters (ISOMITTED), called at once (LAMBDA(x,x+1)(5)), kept in a defined name, or passed toMAP,REDUCE,SCAN,BYROW,BYCOL,MAKEARRAY. A function of the engine goes there by its name:BYROW(rows, SUM). One that calls itself without end is#NUM!.- A formula that gives several values fills the cells next to it:
=SEQUENCE(5),=FILTER(…),=SORT(…),=UNIQUE(…),=A1:A5*2,VSTACK,TAKE,GROUPBY,PIVOTBY… as many cells as it gives now. A cell in the way makes it#SPILL!until the cell is cleared; typing over a value it filled does the same, and Undo gives the cell back.A1#is all the cells the formula of A1 fills;@takes the one value of a range that is the formula's own. - Saved as Excel saves them (an array formula over the cells filled, marked dynamic in the workbook's metadata; the names of
LET/LAMBDAwith their_xlpm.prefix,@asSINGLE,#asANCHORARRAY): dynamic again when the file is opened, here and in Excel. - A formula read from a file that is not marked so keeps Excel's older reading (where one value goes, a range gives the one of the formula's own row or column), also when it is filled down, pasted, or put back by Undo. Only a formula typed becomes a dynamic array formula.
- A range holding a dynamic array formula is not sorted (Excel refuses too): sort the cells it reads, or use
SORT.
Spreadsheets: names, tables, references
- Defined names of the workbook, and those local to a sheet, are evaluated:
=SUM(Sales),=Rate*A1. A change in the cells a name stands for computes what uses it; the names follow rows and columns inserted or deleted. A formula with a name kept the value of the file. - Structured references:
Table1[Qty],Table1[@Qty],[@Qty]in a cell of the table,Table1[[#Headers],[Qty]],Table1[#All],Table1[[Q1]:[Q4]]. - 3-D references (
Jan:Dec!B2) and the intersection of two references (a space:B2:D4 C1:C9,North Q1). - Names and tables are read from the file: they cannot be defined or changed in the editor yet.
For integrators
- A workbook whose formulas use defined names, tables or the functions added is computed where its values were kept: after the first edit a cell may show another value than the one the file held, if that one was stale.
- A copied cell (
ClipCellofxlsx.copy) has a fifth element,true, when its formula is a dynamic array formula; the cells a formula fills are copied empty when their formula is copied with them. An edit result hasgrown({ rows, cols }) when a formula filled cells past the last row / column of the sheet. - Collaboration: every client of a room needs this version (one before it does not fill the cells of a dynamic array formula).
- Size: the worker is 1.54 MB (477 KB gzipped), 180 KB more; the viewer chunk 35 KB more (the functions the editor suggests).
Full Changelog: v0.16.0...v0.17.0