Formula Functions
werkbook ships with broad Excel formula coverage. The current community build supports more than 300 built-in functions across classic worksheet formulas, dynamic array functions, lookup helpers, financial functions, and lambda-style helpers.
This page is a high-level reference to the function families and the formula semantics that matter when using the library API. For programmatic discovery, run wb formula list.
Coverage Highlights
Representative functions from the current build:
| Category | Representative functions |
|---|---|
| Math and trig | ABS, ROUND, ROUNDUP, FLOOR, POWER, SEQUENCE, MMULT, MUNIT |
| Statistical | AVERAGE, COUNTIFS, MEDIAN, LARGE, SMALL, PERCENTILE, RANK.EQ |
| Text | TEXT, CONCAT, CONCATENATE, LEFT, MID, SEARCH, SUBSTITUTE, ROMAN |
| Date and time | DATE, DATEDIF, DATEVALUE, DAY, NETWORKDAYS, NOW, TODAY |
| Lookup and reference | INDEX, MATCH, XLOOKUP, FILTER, UNIQUE, CHOOSECOLS, DROP |
| Logical and lambda | IF, IFS, IFERROR, LET, LAMBDA, MAP, BYROW, BYCOL, SORT |
| Financial | PMT, PV, FV, NPV, IRR, RATE, CUMIPMT, SLN |
| Engineering and info | CONVERT, BIN2DEC, HEX2DEC, FORMULATEXT, ISFORMULA, ERROR.TYPE |
Modern Excel Features
The engine supports a useful subset of newer Excel behavior, including:
- dynamic array functions such as
FILTER,UNIQUE,SORT,SEQUENCE,HSTACK, andVSTACK - lambda-style helpers such as
LET,LAMBDA,MAP,BYROW, andBYCOL - structured references against worksheet tables
- defined names with workbook or sheet scope
- cross-sheet references and whole-column references
Function Semantics in the Library
Formulas are stored without =
sheet.SetFormula("A1", "SUM(B1:B10)")
Results are lazy
Sheet.GetValue evaluates the formula on demand. Cell.Value() returns the cached cell payload and may not force recalculation.
Array results return the anchor-cell value through GetValue
If a formula spills an array, reading the formula cell through GetValue returns the top-left element of that result.
Errors come back as werkbook.TypeError
Typical values include #DIV/0!, #REF!, #VALUE!, #N/A, #SPILL!, and #CALC!.
Common Patterns
Conditional aggregation
SUMIFS(D2:D100, A2:A100, "West", B2:B100, ">0")
Modern lookup
XLOOKUP(A2, Products[SKU], Products[Price])
Named ranges
Revenue * TaxRate
Dynamic arrays
SORT(UNIQUE(FILTER(A2:A100, A2:A100<>"")))
Using the CLI
List all registered functions:
wb formula list