From b75de4cc7fb5d386a5a6b6101d9c0a9098f8a1d2 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Mon, 29 Jun 2026 08:41:32 +0000 Subject: [PATCH 01/15] feat(metadata): add formatFunctionSyntax helper (HF-249) --- .../functionMetadata/formatFunctionSyntax.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/interpreter/functionMetadata/formatFunctionSyntax.ts diff --git a/src/interpreter/functionMetadata/formatFunctionSyntax.ts b/src/interpreter/functionMetadata/formatFunctionSyntax.ts new file mode 100644 index 000000000..3e233e6c9 --- /dev/null +++ b/src/interpreter/functionMetadata/formatFunctionSyntax.ts @@ -0,0 +1,25 @@ +/** + * @license + * Copyright (c) 2025 Handsoncode. All rights reserved. + */ + +/** + * Builds the human-readable syntax string for a function from its parameter list, e.g. `SUM(Number1, ...)`. + * Reuses the convention previously shipped as `generateSyntax`: each optional parameter is wrapped in its own + * `[brackets]`, and a single `, ...` suffix denotes that the trailing arguments repeat. Internal to the + * functionMetadata module (docs generator + future consumers); not exported from the package index. + * + * @param {string} localizedName - the function name as shown to the user, e.g. `'SUMIF'` + * @param {{ name: string, optional: boolean }[]} parameters - ordered parameters with optionality + * @param {number} repeatLastArgs - number of trailing parameters that repeat; `> 0` adds the `, ...` suffix + * @returns {string} the syntax string, e.g. `'SUMIF(Range, Criteria, [Sumrange])'` + */ +export function formatFunctionSyntax( + localizedName: string, + parameters: { name: string, optional: boolean }[], + repeatLastArgs: number, +): string { + const rendered = parameters.map(parameter => parameter.optional ? `[${parameter.name}]` : parameter.name) + const repeatSuffix = repeatLastArgs > 0 ? ', ...' : '' + return `${localizedName}(${rendered.join(', ')}${repeatSuffix})` +} From 17866031fdde022eb6c1175350d3a1eab9cb7e32 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Mon, 29 Jun 2026 08:54:01 +0000 Subject: [PATCH 02/15] feat(metadata): add pure built-in functions table renderer and marker splice (HF-249) --- .../renderBuiltinFunctionsTable.ts | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts diff --git a/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts b/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts new file mode 100644 index 000000000..fdefc9ce8 --- /dev/null +++ b/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts @@ -0,0 +1,92 @@ +/** + * @license + * Copyright (c) 2025 Handsoncode. All rights reserved. + */ + +import {FUNCTION_CATEGORIES, FunctionCategory, FunctionDetails, FunctionListEntry} from './FunctionDescription' +import {formatFunctionSyntax} from './formatFunctionSyntax' + +/** Opening marker; the generated table region begins on the next line. */ +export const FUNCTIONS_TABLE_START = '' +/** Closing marker; everything after it (e.g. footnote definitions) is hand-maintained. */ +export const FUNCTIONS_TABLE_END = '' + +/** Deterministic, environment-independent ordering for function names (never ambient locale). */ +const COLLATOR = new Intl.Collator('en', {sensitivity: 'variant', caseFirst: 'upper'}) + +/** Escapes only the table-breaking pipe; all other markdown (links, code, `
`, footnotes) is verbatim. */ +function escapeCell(text: string): string { + return text.replace(/\r?\n/g, '
').replace(/\|/g, '\\|') +} + +/** + * Renders the built-in functions table as markdown: one `### Category` section per category (in the canonical + * `FUNCTION_CATEGORIES` order), each a 3-column table (Function ID | Description | Syntax). Rows are sorted by a + * pinned collator for deterministic, byte-idempotent output. Reads only the passed entries + details provider, + * so it is independent of how the catalogue is stored (forward-compatible with a per-function file split). + * + * @param {FunctionListEntry[]} entries - the function set to document (e.g. `HyperFormula.getAvailableFunctions`) + * @param {(canonicalName: string) => FunctionDetails | undefined} detailsFor - resolves a function's details + * @returns {string} the markdown for the table region (no surrounding markers, LF, trailing newline) + * @throws {Error} when a listed entry has no resolvable details + */ +export function renderBuiltinFunctionsTable( + entries: FunctionListEntry[], + detailsFor: (canonicalName: string) => FunctionDetails | undefined, +): string { + const byCategory = new Map() + for (const entry of entries) { + if (entry.category === undefined) { + continue + } + const bucket = byCategory.get(entry.category) ?? [] + bucket.push(entry) + byCategory.set(entry.category, bucket) + } + + const sections: string[] = [] + for (const category of FUNCTION_CATEGORIES) { + const bucket = byCategory.get(category) + if (bucket === undefined || bucket.length === 0) { + continue + } + bucket.sort((a, b) => COLLATOR.compare(a.localizedName, b.localizedName)) + const rows = bucket.map(entry => { + const details = detailsFor(entry.canonicalName) + if (details === undefined) { + throw new Error(`No details for listed function "${entry.canonicalName}"`) + } + const syntax = formatFunctionSyntax(details.localizedName, details.parameters, details.repeatLastArgs) + const anchor = `` + return `| ${anchor}${escapeCell(entry.localizedName)} | ${escapeCell(entry.shortDescription)} | ${escapeCell(syntax)} |` + }) + sections.push(`### ${category}\n\n| Function ID | Description | Syntax |\n|:---|:---|:---|\n${rows.join('\n')}`) + } + + return sections.join('\n\n') + '\n' +} + +/** + * Replaces the content between the autogenerated markers in a markdown file, preserving everything outside them + * (intro prose, footnote definitions). Fails loud on a malformed marker state rather than clobbering the file. + * + * @param {string} fileContent - the full current file content + * @param {string} generatedSection - the markdown to place between the markers (from renderBuiltinFunctionsTable) + * @returns {string} the updated file content + * @throws {Error} when either marker is missing, duplicated, or out of order + */ +export function spliceFunctionsTable(fileContent: string, generatedSection: string): string { + const startCount = fileContent.split(FUNCTIONS_TABLE_START).length - 1 + const endCount = fileContent.split(FUNCTIONS_TABLE_END).length - 1 + if (startCount !== 1 || endCount !== 1) { + throw new Error(`Expected exactly one START and one END marker, found ${startCount}/${endCount}`) + } + const startIdx = fileContent.indexOf(FUNCTIONS_TABLE_START) + const endIdx = fileContent.indexOf(FUNCTIONS_TABLE_END) + if (endIdx < startIdx) { + throw new Error('END marker appears before START marker') + } + const before = fileContent.slice(0, startIdx + FUNCTIONS_TABLE_START.length) + const after = fileContent.slice(endIdx) + return `${before}\n${generatedSection}\n${after}` +} From d4daccdd7171b4aa9bbf1741d25b8b991f7c1639 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Mon, 29 Jun 2026 09:09:35 +0000 Subject: [PATCH 03/15] docs(guide): add autogeneration markers around the functions table (HF-249) --- docs/guide/built-in-functions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/guide/built-in-functions.md b/docs/guide/built-in-functions.md index 5798f0404..f983334f6 100644 --- a/docs/guide/built-in-functions.md +++ b/docs/guide/built-in-functions.md @@ -55,6 +55,10 @@ You can modify the built-in functions or create your own, by adding a [custom fu ## List of available functions + + + Total number of functions: **{{ $page.functionsCount }}** ### Array manipulation @@ -539,6 +543,8 @@ Total number of functions: **{{ $page.functionsCount }}** | UPPER | Returns text converted to uppercase. | UPPER(Text) | | VALUE | Parses a number, date, time, datetime, currency, or percentage from a text string. | VALUE(Text) | + + [^non-odff]: The return value of this function is compliant with the [OpenDocument standard](https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html), From 785bdbad3991f7fddc7e4b2ac77b0db1fc04f5ed Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Mon, 29 Jun 2026 09:23:41 +0000 Subject: [PATCH 04/15] docs(guide): keep functions-count line outside the autogeneration markers (HF-249) --- docs/guide/built-in-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/built-in-functions.md b/docs/guide/built-in-functions.md index f983334f6..a391f396c 100644 --- a/docs/guide/built-in-functions.md +++ b/docs/guide/built-in-functions.md @@ -55,12 +55,12 @@ You can modify the built-in functions or create your own, by adding a [custom fu ## List of available functions +Total number of functions: **{{ $page.functionsCount }}** + -Total number of functions: **{{ $page.functionsCount }}** - ### Array manipulation | Function ID | Description | Syntax | From 4cb3744786fbaac67acb606c669cbdf0773cbf6e Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Mon, 29 Jun 2026 09:24:27 +0000 Subject: [PATCH 05/15] docs(guide): place do-not-edit note above the START marker so regeneration preserves it (HF-249) --- docs/guide/built-in-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/built-in-functions.md b/docs/guide/built-in-functions.md index a391f396c..d3c98055a 100644 --- a/docs/guide/built-in-functions.md +++ b/docs/guide/built-in-functions.md @@ -57,9 +57,9 @@ You can modify the built-in functions or create your own, by adding a [custom fu Total number of functions: **{{ $page.functionsCount }}** - + ### Array manipulation From b25b121be069352296ac5d35fcbc2d972224c75b Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Mon, 29 Jun 2026 09:30:14 +0000 Subject: [PATCH 06/15] feat(docs): generate built-in functions table from HF API (HF-249) --- docs/guide/built-in-functions.md | 890 +++++++++++----------- package.json | 1 + scripts/generate-builtin-functions-doc.ts | 48 ++ 3 files changed, 493 insertions(+), 446 deletions(-) create mode 100644 scripts/generate-builtin-functions-doc.ts diff --git a/docs/guide/built-in-functions.md b/docs/guide/built-in-functions.md index d3c98055a..3ce56891d 100644 --- a/docs/guide/built-in-functions.md +++ b/docs/guide/built-in-functions.md @@ -60,488 +60,486 @@ Total number of functions: **{{ $page.functionsCount }}** - ### Array manipulation -| Function ID | Description | Syntax | -|:----------------|:-----------------------------------------------------------------|:-----------------------------------------------------------| -| ARRAYFORMULA | Enables the array arithmetic mode for a single formula. | ARRAYFORMULA(Formula) | -| FILTER | Filters an array, based on multiple conditions (boolean arrays). | FILTER(SourceArray, BoolArray1, BoolArray2, ...BoolArrayN) | -| ARRAY_CONSTRAIN | Truncates an array to given dimensions. | ARRAY_CONSTRAIN(Array, Height, Width) | -| SEQUENCE | Returns an array of sequential numbers. | SEQUENCE(Rows, [Cols], [Start], [Step]) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| ARRAY_CONSTRAIN | Truncates an array to given dimensions. | ARRAY_CONSTRAIN(Array, Height, Width) | +| ARRAYFORMULA | Enables the array arithmetic mode for a single formula. | ARRAYFORMULA(Formula) | +| FILTER | Filters an array, based on multiple conditions (boolean arrays). | FILTER(SourceArray, BoolArray1, ...) | +| SEQUENCE | Returns an array of sequential numbers. | SEQUENCE(Rows, [Cols], [Start], [Step]) | -### Date and time +### Database -| Function ID | Description | Syntax | -|:-----------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------| -| DATE | Returns the specified date as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate). | DATE(Year, Month, Day) | -| DATEDIF | Calculates distance between two dates.
Supported units: "D" (days), "M" (months), "Y" (years), "MD" (days ignoring months and years), "YM" (months ignoring years), or "YD" (days ignoring years). | DATEDIF(Date1, Date2, Unit) | -| DATEVALUE | Parses a date string and returns it as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate).
Accepts formats set by the [`dateFormats`](../api/interfaces/configparams.md#dateformats) option. | DATEVALUE(Datestring) | -| DAY | Returns the day of the given date value. | DAY(Number) | -| DAYS | Calculates the difference between two date values. | DAYS(Date2, Date1) | -| DAYS360 | Calculates the difference between two date values in days, in 360-day basis. | DAYS360(Date2, Date1[, Format]) | -| EDATE | Shifts the given startdate by given number of months and returns it as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate).[^non-odff] | EDATE(Startdate, Months) | -| EOMONTH | Returns the date of the last day of a month which falls months away from the start date. Returns the value in the form of number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate).[^non-odff] | EOMONTH(Startdate, Months) | -| HOUR | Returns hour component of given time. | HOUR(Time) | -| INTERVAL | Returns interval string from given number of seconds. | INTERVAL(Seconds) | -| ISOWEEKNUM | Returns an ISO week number that corresponds to the week of year. | ISOWEEKNUM(Date) | -| MINUTE | Returns minute component of given time. | MINUTE(Time) | -| MONTH | Returns the month for the given date value. | MONTH(Number) | -| NETWORKDAYS | Returns the number of working days between two given dates. | NETWORKDAYS(Date1, Date2[, Holidays]) | -| NETWORKDAYS.INTL | Returns the number of working days between two given dates. | NETWORKDAYS.INTL(Date1, Date2[, Mode [, Holidays]]) | -| NOW | Returns current date + time as a number of days since [`nullDate`](../api/interfaces/configparams.md#nulldate). | NOW() | -| SECOND | Returns second component of given time. | SECOND(Time) | -| TIME | Returns the number that represents a given time as a fraction of full day. | TIME(Hour, Minute, Second) | -| TIMEVALUE | Parses a time string and returns a number that represents it as a fraction of a full day.
Accepts formats set by the [`timeFormats`](../api/interfaces/configparams.md#timeformats) option. | TIMEVALUE(Timestring) | -| TODAY | Returns an integer representing the current date as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate). | TODAY() | -| WEEKDAY | Computes a number between 1-7 representing the day of week. | WEEKDAY(Date, Type) | -| WEEKNUM | Returns a week number that corresponds to the week of year. | WEEKNUM(Date, Type) | -| WORKDAY | Returns the working day number of days from start day. | WORKDAY(Date, Shift[, Holidays]) | -| WORKDAY.INTL | Returns the working day number of days from start day. | WORKDAY(Date, Shift[, Mode[, Holidays]]) | -| YEAR | Returns the year as a number according to the internal calculation rules. | YEAR(Number) | -| YEARFRAC | Computes the difference between two date values, in fraction of years. | YEARFRAC(Date2, Date1[, Format]) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| DAVERAGE | Returns the average of all values in a database field that match the given criteria. | DAVERAGE(Database, Field, Criteria) | +| DCOUNT | Counts the cells containing numbers in a database field that match the given criteria. | DCOUNT(Database, Field, Criteria) | +| DCOUNTA | Counts the non-empty cells in a database field that match the given criteria. | DCOUNTA(Database, Field, Criteria) | +| DGET | Returns the single value from a database field that matches the given criteria. Returns #VALUE! if no records match, and #NUM! if more than one record matches. | DGET(Database, Field, Criteria) | +| DMAX | Returns the maximum value in a database field that matches the given criteria. | DMAX(Database, Field, Criteria) | +| DMIN | Returns the minimum value in a database field that matches the given criteria. | DMIN(Database, Field, Criteria) | +| DPRODUCT | Returns the product of all values in a database field that match the given criteria. | DPRODUCT(Database, Field, Criteria) | +| DSTDEV | Returns the sample standard deviation of all values in a database field that match the given criteria. | DSTDEV(Database, Field, Criteria) | +| DSTDEVP | Returns the population standard deviation of all values in a database field that match the given criteria. | DSTDEVP(Database, Field, Criteria) | +| DSUM | Returns the sum of all values in a database field that match the given criteria. | DSUM(Database, Field, Criteria) | +| DVAR | Returns the sample variance of all values in a database field that match the given criteria. | DVAR(Database, Field, Criteria) | +| DVARP | Returns the population variance of all values in a database field that match the given criteria. | DVARP(Database, Field, Criteria) | -### Database +### Date and time -| Function ID | Description | Syntax | -|:------------|:----------------------------------------------------------------------------------------------------------------|:----------------------------------| -| DAVERAGE | Returns the average of all values in a database field that match the given criteria. | DAVERAGE(Database, Field, Criteria) | -| DCOUNT | Counts the cells containing numbers in a database field that match the given criteria. | DCOUNT(Database, Field, Criteria) | -| DCOUNTA | Counts the non-empty cells in a database field that match the given criteria. | DCOUNTA(Database, Field, Criteria) | -| DGET | Returns the single value from a database field that matches the given criteria. Returns #VALUE! if no records match, and #NUM! if more than one record matches. | DGET(Database, Field, Criteria) | -| DMAX | Returns the maximum value in a database field that matches the given criteria. | DMAX(Database, Field, Criteria) | -| DMIN | Returns the minimum value in a database field that matches the given criteria. | DMIN(Database, Field, Criteria) | -| DPRODUCT | Returns the product of all values in a database field that match the given criteria. | DPRODUCT(Database, Field, Criteria) | -| DSTDEV | Returns the sample standard deviation of all values in a database field that match the given criteria. | DSTDEV(Database, Field, Criteria) | -| DSTDEVP | Returns the population standard deviation of all values in a database field that match the given criteria. | DSTDEVP(Database, Field, Criteria) | -| DSUM | Returns the sum of all values in a database field that match the given criteria. | DSUM(Database, Field, Criteria) | -| DVAR | Returns the sample variance of all values in a database field that match the given criteria. | DVAR(Database, Field, Criteria) | -| DVARP | Returns the population variance of all values in a database field that match the given criteria. | DVARP(Database, Field, Criteria) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| DATE | Returns the specified date as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate). | DATE(Year, Month, Day) | +| DATEDIF | Calculates distance between two dates.
Supported units: "D" (days), "M" (months), "Y" (years), "MD" (days ignoring months and years), "YM" (months ignoring years), or "YD" (days ignoring years). | DATEDIF(Date1, Date2, Unit) | +| DATEVALUE | Parses a date string and returns it as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate).
Accepts formats set by the [`dateFormats`](../api/interfaces/configparams.md#dateformats) option. | DATEVALUE(Datestring) | +| DAY | Returns the day of the given date value. | DAY(Number) | +| DAYS | Calculates the difference between two date values. | DAYS(Date2, Date1) | +| DAYS360 | Calculates the difference between two date values in days, in 360-day basis. | DAYS360(Date2, Date1, [Format]) | +| EDATE | Shifts the given startdate by given number of months and returns it as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate).[^non-odff] | EDATE(Startdate, Months) | +| EOMONTH | Returns the date of the last day of a month which falls months away from the start date. Returns the value in the form of number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate).[^non-odff] | EOMONTH(Startdate, Months) | +| HOUR | Returns hour component of given time. | HOUR(Time) | +| INTERVAL | Returns interval string from given number of seconds. | INTERVAL(Seconds) | +| ISOWEEKNUM | Returns an ISO week number that corresponds to the week of year. | ISOWEEKNUM(Date) | +| MINUTE | Returns minute component of given time. | MINUTE(Time) | +| MONTH | Returns the month for the given date value. | MONTH(Number) | +| NETWORKDAYS | Returns the number of working days between two given dates. | NETWORKDAYS(Date1, Date2, [Holidays]) | +| NETWORKDAYS.INTL | Returns the number of working days between two given dates. | NETWORKDAYS.INTL(Date1, Date2, [Mode], [Holidays]) | +| NOW | Returns current date + time as a number of days since [`nullDate`](../api/interfaces/configparams.md#nulldate). | NOW() | +| SECOND | Returns second component of given time. | SECOND(Time) | +| TIME | Returns the number that represents a given time as a fraction of full day. | TIME(Hour, Minute, Second) | +| TIMEVALUE | Parses a time string and returns a number that represents it as a fraction of a full day.
Accepts formats set by the [`timeFormats`](../api/interfaces/configparams.md#timeformats) option. | TIMEVALUE(Timestring) | +| TODAY | Returns an integer representing the current date as the number of full days since [`nullDate`](../api/interfaces/configparams.md#nulldate). | TODAY() | +| WEEKDAY | Computes a number between 1-7 representing the day of week. | WEEKDAY(Date, [Type]) | +| WEEKNUM | Returns a week number that corresponds to the week of year. | WEEKNUM(Date, [Type]) | +| WORKDAY | Returns the working day number of days from start day. | WORKDAY(Date, Shift, [Holidays]) | +| WORKDAY.INTL | Returns the working day number of days from start day. | WORKDAY.INTL(Date, Shift, [Mode], [Holidays]) | +| YEAR | Returns the year as a number according to the internal calculation rules. | YEAR(Number) | +| YEARFRAC | Computes the difference between two date values, in fraction of years. | YEARFRAC(Date2, Date1, [Format]) | ### Engineering -| Function ID | Description | Syntax | -|:------------|:------------------------------------------------------------------------------------|:-------------------------------------------| -| BIN2DEC | The result is the decimal number for the binary number entered. | BIN2DEC(Number) | -| BIN2HEX | The result is the hexadecimal number for the binary number entered. | BIN2HEX(Number, Places) | -| BIN2OCT | The result is the octal number for the binary number entered. | BIN2OCT(Number, Places) | -| BITAND | Returns a bitwise logical "and" of the parameters. | BITAND(Number1, Number2) | -| BITLSHIFT | Shifts a number left by n bits. | BITLSHIFT(Number, Shift) | -| BITOR | Returns a bitwise logical "or" of the parameters. | BITOR(Number1, Number2) | -| BITRSHIFT | Shifts a number right by n bits. | BITRSHIFT(Number, Shift) | -| BITXOR | Returns a bitwise logical "exclusive or" of the parameters. | BITXOR(Number1, Number2) | -| COMPLEX | Returns complex number from Re and Im parts. | COMPLEX(Re, Im[, Symbol]) | -| DEC2BIN | Returns the binary number for the decimal number entered between –512 and 511. | DEC2BIN(Number, Places) | -| DEC2HEX | Returns the hexadecimal number for the decimal number entered. | DEC2HEX(Number, Places) | -| DEC2OCT | Returns the octal number for the decimal number entered. | DEC2OCT(Number, Places) | -| DELTA | Returns TRUE (1) if both numbers are equal, otherwise returns FALSE (0). | DELTA(Number_1, Number_2) | -| ERF | Returns values of the Gaussian error integral. | ERF(Lower_Limit, Upper_Limit) | -| ERFC | Returns complementary values of the Gaussian error integral between x and infinity. | ERFC(Lower_Limit) | -| HEX2BIN | The result is the binary number for the hexadecimal number entered. | HEX2BIN(Number, Places) | -| HEX2DEC | The result is the decimal number for the hexadecimal number entered. | HEX2DEC(Number) | -| HEX2OCT | The result is the octal number for the hexadecimal number entered. | HEX2OCT(Number, Places) | -| IMABS | Returns modulus of a complex number. | IMABS(Complex) | -| IMAGINARY | Returns imaginary part of a complex number. | IMAGINARY(Complex) | -| IMARGUMENT | Returns argument of a complex number. | IMARGUMENT(Complex) | -| IMCONJUGATE | Returns conjugate of a complex number. | IMCONJUGATE(Complex) | -| IMCOS | Returns cosine of a complex number. | IMCOS(Complex) | -| IMCOSH | Returns hyperbolic cosine of a complex number. | IMCOSH(Complex) | -| IMCOT | Returns cotangent of a complex number. | IMCOT(Complex) | -| IMCSC | Returns cosecant of a complex number. | IMCSC(Complex) | -| IMCSCH | Returns hyperbolic cosecant of a complex number. | IMCSCH(Complex) | -| IMDIV | Divides two complex numbers. | IMDIV(Complex1, Complex2) | -| IMEXP | Returns exponent of a complex number. | IMEXP(Complex) | -| IMLN | Returns natural logarithm of a complex number. | IMLN(Complex) | -| IMLOG2 | Returns binary logarithm of a complex number. | IMLOG2(Complex) | -| IMLOG10 | Returns base-10 logarithm of a complex number. | IMLOG10(Complex) | -| IMPOWER | Returns a complex number raised to a given power. | IMPOWER(Complex, Number) | -| IMPRODUCT | Multiplies complex numbers. | IMPRODUCT(Complex1, Complex2, ...ComplexN) | -| IMREAL | Returns real part of a complex number. | IMREAL(Complex) | -| IMSEC | Returns the secant of a complex number. | IMSEC(Complex) | -| IMSECH | Returns the hyperbolic secant of a complex number. | IMSECH(Complex) | -| IMSIN | Returns sine of a complex number. | IMSIN(Complex) | -| IMSINH | Returns hyperbolic sine of a complex number. | IMSINH(Complex) | -| IMSQRT | Returns a square root of a complex number. | IMSQRT(Complex) | -| IMSUB | Subtracts two complex numbers. | IMSUB(Complex1, Complex2) | -| IMSUM | Adds complex numbers. | IMSUM(Complex1, Complex2, ..ComplexN) | -| IMTAN | Returns the tangent of a complex number. | IMTAN(Complex) | -| OCT2BIN | The result is the binary number for the octal number entered. | OCT2BIN(Number, Places) | -| OCT2DEC | The result is the decimal number for the octal number entered. | OCT2DEC(Number) | -| OCT2HEX | The result is the hexadecimal number for the octal number entered. | OCT2HEX(Number, Places) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| BIN2DEC | The result is the decimal number for the binary number entered. | BIN2DEC(Number) | +| BIN2HEX | The result is the hexadecimal number for the binary number entered. | BIN2HEX(Number, [Places]) | +| BIN2OCT | The result is the octal number for the binary number entered. | BIN2OCT(Number, [Places]) | +| BITAND | Returns a bitwise logical "and" of the parameters. | BITAND(Number1, Number2) | +| BITLSHIFT | Shifts a number left by n bits. | BITLSHIFT(Number, Shift) | +| BITOR | Returns a bitwise logical "or" of the parameters. | BITOR(Number1, Number2) | +| BITRSHIFT | Shifts a number right by n bits. | BITRSHIFT(Number, Shift) | +| BITXOR | Returns a bitwise logical "exclusive or" of the parameters. | BITXOR(Number1, Number2) | +| COMPLEX | Returns complex number from Re and Im parts. | COMPLEX(Re, Im, [Symbol]) | +| DEC2BIN | Returns the binary number for the decimal number entered between –512 and 511. | DEC2BIN(Number, [Places]) | +| DEC2HEX | Returns the hexadecimal number for the decimal number entered. | DEC2HEX(Number, [Places]) | +| DEC2OCT | Returns the octal number for the decimal number entered. | DEC2OCT(Number, [Places]) | +| DELTA | Returns TRUE (1) if both numbers are equal, otherwise returns FALSE (0). | DELTA(Number_1, [Number_2]) | +| ERF | Returns values of the Gaussian error integral. | ERF(Lower_Limit, [Upper_Limit]) | +| ERFC | Returns complementary values of the Gaussian error integral between x and infinity. | ERFC(Lower_Limit) | +| HEX2BIN | The result is the binary number for the hexadecimal number entered. | HEX2BIN(Number, [Places]) | +| HEX2DEC | The result is the decimal number for the hexadecimal number entered. | HEX2DEC(Number) | +| HEX2OCT | The result is the octal number for the hexadecimal number entered. | HEX2OCT(Number, [Places]) | +| IMABS | Returns modulus of a complex number. | IMABS(Complex) | +| IMAGINARY | Returns imaginary part of a complex number. | IMAGINARY(Complex) | +| IMARGUMENT | Returns argument of a complex number. | IMARGUMENT(Complex) | +| IMCONJUGATE | Returns conjugate of a complex number. | IMCONJUGATE(Complex) | +| IMCOS | Returns cosine of a complex number. | IMCOS(Complex) | +| IMCOSH | Returns hyperbolic cosine of a complex number. | IMCOSH(Complex) | +| IMCOT | Returns cotangent of a complex number. | IMCOT(Complex) | +| IMCSC | Returns cosecant of a complex number. | IMCSC(Complex) | +| IMCSCH | Returns hyperbolic cosecant of a complex number. | IMCSCH(Complex) | +| IMDIV | Divides two complex numbers. | IMDIV(Complex1, Complex2) | +| IMEXP | Returns exponent of a complex number. | IMEXP(Complex) | +| IMLN | Returns natural logarithm of a complex number. | IMLN(Complex) | +| IMLOG10 | Returns base-10 logarithm of a complex number. | IMLOG10(Complex) | +| IMLOG2 | Returns binary logarithm of a complex number. | IMLOG2(Complex) | +| IMPOWER | Returns a complex number raised to a given power. | IMPOWER(Complex, Number) | +| IMPRODUCT | Multiplies complex numbers. | IMPRODUCT(Complex1, ...) | +| IMREAL | Returns real part of a complex number. | IMREAL(Complex) | +| IMSEC | Returns the secant of a complex number. | IMSEC(Complex) | +| IMSECH | Returns the hyperbolic secant of a complex number. | IMSECH(Complex) | +| IMSIN | Returns sine of a complex number. | IMSIN(Complex) | +| IMSINH | Returns hyperbolic sine of a complex number. | IMSINH(Complex) | +| IMSQRT | Returns a square root of a complex number. | IMSQRT(Complex) | +| IMSUB | Subtracts two complex numbers. | IMSUB(Complex1, Complex2) | +| IMSUM | Adds complex numbers. | IMSUM(Complex1, ...) | +| IMTAN | Returns the tangent of a complex number. | IMTAN(Complex) | +| OCT2BIN | The result is the binary number for the octal number entered. | OCT2BIN(Number, [Places]) | +| OCT2DEC | The result is the decimal number for the octal number entered. | OCT2DEC(Number) | +| OCT2HEX | The result is the hexadecimal number for the octal number entered. | OCT2HEX(Number, [Places]) | ### Information -| Function ID | Description | Syntax | -|:------------|:---------------------------------------------------------------------------------------------------------------|:-----------------| -| ISBINARY | Returns TRUE if provided value is a valid binary number. | ISBINARY(Value) | -| ISBLANK | Returns TRUE if the reference to a cell is blank. | ISBLANK(Value) | -| ISERR | Returns TRUE if the value is error value except #N/A!. | ISERR(Value) | -| ISERROR | Returns TRUE if the value is general error value. | ISERROR(Value) | -| ISEVEN | Returns TRUE if the value is an even integer, or FALSE if the value is odd. | ISEVEN(Value) | -| ISFORMULA | Checks whether referenced cell is a formula. | ISFORMULA(Value) | -| ISLOGICAL | Tests for a logical value (TRUE or FALSE). | ISLOGICAL(Value) | -| ISNA | Returns TRUE if the value is #N/A! error. | ISNA(Value) | -| ISNONTEXT | Tests if the cell contents are text or numbers, and returns FALSE if the contents are text. | ISNONTEXT(Value) | -| ISNUMBER | Returns TRUE if the value refers to a number. | ISNUMBER(Value) | -| ISODD | Returns TRUE if the value is odd, or FALSE if the number is even. | ISODD(Value) | -| ISREF | Returns TRUE if provided value is #REF! error. | ISREF(Value) | -| ISTEXT | Returns TRUE if the cell contents reference text. | ISTEXT(Value) | -| SHEET | Returns sheet number of a given value or a formula sheet number if no argument is provided. | SHEET([Value]) | -| SHEETS | Returns number of sheet of a given reference or number of all sheets in workbook when no argument is provided. | SHEETS([Value]) | -| NA | Returns #N/A! error value. | NA(Value) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| ISBINARY | Returns TRUE if provided value is a valid binary number. | ISBINARY(Value) | +| ISBLANK | Returns TRUE if the reference to a cell is blank. | ISBLANK(Value) | +| ISERR | Returns TRUE if the value is error value except #N/A!. | ISERR(Value) | +| ISERROR | Returns TRUE if the value is general error value. | ISERROR(Value) | +| ISEVEN | Returns TRUE if the value is an even integer, or FALSE if the value is odd. | ISEVEN(Value) | +| ISFORMULA | Checks whether referenced cell is a formula. | ISFORMULA(Value) | +| ISLOGICAL | Tests for a logical value (TRUE or FALSE). | ISLOGICAL(Value) | +| ISNA | Returns TRUE if the value is #N/A! error. | ISNA(Value) | +| ISNONTEXT | Tests if the cell contents are text or numbers, and returns FALSE if the contents are text. | ISNONTEXT(Value) | +| ISNUMBER | Returns TRUE if the value refers to a number. | ISNUMBER(Value) | +| ISODD | Returns TRUE if the value is odd, or FALSE if the number is even. | ISODD(Value) | +| ISREF | Returns TRUE if provided value is #REF! error. | ISREF(Value) | +| ISTEXT | Returns TRUE if the cell contents reference text. | ISTEXT(Value) | +| NA | Returns #N/A! error value. | NA() | +| SHEET | Returns sheet number of a given value or a formula sheet number if no argument is provided. | SHEET(Value) | +| SHEETS | Returns number of sheet of a given reference or number of all sheets in workbook when no argument is provided. | SHEETS(Value) | ### Financial -| Function ID | Description | Syntax | -|:------------|:---------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------| -| CUMIPMT | Returns the cumulative interest paid on a loan between a start period and an end period. | CUMIPMT(Rate, Nper, Pv, Start, End, type) | -| CUMPRINC | Returns the cumulative principal paid on a loan between a start period and an end period. | CUMPRINC(Rate, Nper, Pv, Start, End, Type) | -| DB | Returns the depreciation of an asset for a period using the fixed-declining balance method. | DB(Cost, Salvage, Life, Period[, Month]) | -| DDB | Returns the depreciation of an asset for a period using the double-declining balance method. | DDB(Cost, Salvage, Life, Period[, Factor]) | -| DOLLARDE | Converts a price entered with a special notation to a price displayed as a decimal number. | DOLLARDE(Price, Fraction) | -| DOLLARFR | Converts a price displayed as a decimal number to a price entered with a special notation. | DOLLARFR(Price, Fraction) | -| EFFECT | Calculates the effective annual interest rate from a nominal interest rate and the number of compounding periods per year. | EFFECT (Nominal_rate, Npery) | -| FV | Returns the future value of an investment. | FV(Rate, Nper, Pmt[, Pv,[ Type]]) | -| FVSCHEDULE | Returns the future value of an investment based on a rate schedule. | FV(Pv, Schedule) | -| IPMT | Returns the interest portion of a given loan payment in a given payment period. | IPMT(Rate, Per, Nper, Pv[, Fv[, Type]]) | -| IRR | Returns the internal rate of return for a series of cash flows. | IRR(Values[, Guess]) | -| ISPMT | Returns the interest paid for a given period of an investment with equal principal payments. | ISPMT(Rate, Per, Nper, Value) | -| MIRR | Returns modified internal value for cashflows. | MIRR(Flows, FRate, RRate) | -| NOMINAL | Returns the nominal interest rate. | NOMINAL(Effect_rate, Npery) | -| NPER | Returns the number of periods for an investment assuming periodic, constant payments and a constant interest rate. | NPER(Rate, Pmt, Pv[, Fv[, Type]]) | -| NPV | Returns net present value. | NPV(Rate, Value1, Value2, ...ValueN) | -| PDURATION | Returns number of periods to reach specific value. | PDURATION(Rate, Pv, Fv) | -| PMT | Returns the periodic payment for a loan. | PMT(Rate, Nper, Pv[, Fv[, Type]]) | -| PPMT | Calculates the principal portion of a given loan payment. | PPMT(Rate, Per, Nper, Pv[, Fv[, Type]]) | -| PV | Returns the present value of an investment. | PV(Rate, Nper, Pmt[, Fv[, Type]]) | -| RATE | Returns the interest rate per period of an annuity. | RATE(Nper, Pmt, Pv[, Fv[, Type[, guess]]]) | -| RRI | Returns an equivalent interest rate for the growth of an investment. | RRI(Nper, Pv, Fv) | -| SLN | Returns the depreciation of an asset for one period, based on a straight-line method. | SLN(Cost, Salvage, Life) | -| SYD | Returns the "sum-of-years" depreciation for an asset in a period. | SYD(Cost, Salvage, Life, Period) | -| TBILLEQ | Returns the bond-equivalent yield for a Treasury bill. | TBILLEQ(Settlement, Maturity, Discount) | -| TBILLPRICE | Returns the price per $100 face value for a Treasury bill. | TBILLPRICE(Settlement, Maturity, Discount) | -| TBILLYIELD | Returns the yield for a Treasury bill. | TBILLYIELD(Settlement, Maturity, Price) | -| XNPV | Returns net present value. | XNPV(Rate, Payments, Dates) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| CUMIPMT | Returns the cumulative interest paid on a loan between a start period and an end period. | CUMIPMT(Rate, Nper, Pv, Start, End, Type) | +| CUMPRINC | Returns the cumulative principal paid on a loan between a start period and an end period. | CUMPRINC(Rate, Nper, Pv, Start, End, Type) | +| DB | Returns the depreciation of an asset for a period using the fixed-declining balance method. | DB(Cost, Salvage, Life, Period, [Month]) | +| DDB | Returns the depreciation of an asset for a period using the double-declining balance method. | DDB(Cost, Salvage, Life, Period, [Factor]) | +| DOLLARDE | Converts a price entered with a special notation to a price displayed as a decimal number. | DOLLARDE(Price, Fraction) | +| DOLLARFR | Converts a price displayed as a decimal number to a price entered with a special notation. | DOLLARFR(Price, Fraction) | +| EFFECT | Calculates the effective annual interest rate from a nominal interest rate and the number of compounding periods per year. | EFFECT(Nominal_rate, Npery) | +| FV | Returns the future value of an investment. | FV(Rate, Nper, Pmt, [Pv], [Type]) | +| FVSCHEDULE | Returns the future value of an investment based on a rate schedule. | FVSCHEDULE(Pv, Schedule) | +| IPMT | Returns the interest portion of a given loan payment in a given payment period. | IPMT(Rate, Per, Nper, Pv, [Fv], [Type]) | +| IRR | Returns the internal rate of return for a series of cash flows. | IRR(Values, [Guess]) | +| ISPMT | Returns the interest paid for a given period of an investment with equal principal payments. | ISPMT(Rate, Per, Nper, Value) | +| MIRR | Returns modified internal value for cashflows. | MIRR(Flows, FRate, RRate) | +| NOMINAL | Returns the nominal interest rate. | NOMINAL(Effect_rate, Npery) | +| NPER | Returns the number of periods for an investment assuming periodic, constant payments and a constant interest rate. | NPER(Rate, Pmt, Pv, [Fv], [Type]) | +| NPV | Returns net present value. | NPV(Rate, Value1, ...) | +| PDURATION | Returns number of periods to reach specific value. | PDURATION(Rate, Pv, Fv) | +| PMT | Returns the periodic payment for a loan. | PMT(Rate, Nper, Pv, [Fv], [Type]) | +| PPMT | Calculates the principal portion of a given loan payment. | PPMT(Rate, Per, Nper, Pv, [Fv], [Type]) | +| PV | Returns the present value of an investment. | PV(Rate, Nper, Pmt, [Fv], [Type]) | +| RATE | Returns the interest rate per period of an annuity. | RATE(Nper, Pmt, Pv, [Fv], [Type], [Guess]) | +| RRI | Returns an equivalent interest rate for the growth of an investment. | RRI(Nper, Pv, Fv) | +| SLN | Returns the depreciation of an asset for one period, based on a straight-line method. | SLN(Cost, Salvage, Life) | +| SYD | Returns the "sum-of-years" depreciation for an asset in a period. | SYD(Cost, Salvage, Life, Period) | +| TBILLEQ | Returns the bond-equivalent yield for a Treasury bill. | TBILLEQ(Settlement, Maturity, Discount) | +| TBILLPRICE | Returns the price per $100 face value for a Treasury bill. | TBILLPRICE(Settlement, Maturity, Discount) | +| TBILLYIELD | Returns the yield for a Treasury bill. | TBILLYIELD(Settlement, Maturity, Price) | +| XNPV | Returns net present value. | XNPV(Rate, Payments, Dates) | ### Logical -| Function ID | Description | Syntax | -|:------------|:---------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------| -| AND | Returns TRUE if all arguments are TRUE. | AND(Logical_value1, Logical_value2, ...Logical_valueN) | -| FALSE | Returns the logical value FALSE. | FALSE() | -| IF | Specifies a logical test to be performed. | IF(Test, Then_value, Otherwise_value) | -| IFS | Evaluates multiple logical tests and returns a value that corresponds to the first true condition. | IFS(Condition1, Value1 [, Condition2, Value2 [, ...ConditionN, ValueN]]) | -| IFNA | Returns the value if the cell does not contains the #N/A (value not available) error value, or the alternative value if it does. | IFNA(Value, Alternate_value) | -| IFERROR | Returns the value if the cell does not contains an error value, or the alternative value if it does. | IFERROR(Value, Alternate_value) | -| NOT | Complements (inverts) a logical value. | NOT(Logicalvalue) | -| SWITCH | Evaluates a list of arguments, consisting of an expression followed by a value. | SWITCH(Expression1, Value1 [, Expression2, Value2 [, ...ExpressionN, ValueN]]) | -| OR | Returns TRUE if at least one argument is TRUE. | OR(Logical_value1, Logical_value2, ...Logical_valueN) | -| TRUE | The logical value is set to TRUE. | TRUE() | -| XOR | Returns true if an odd number of arguments evaluates to TRUE. | XOR(Logical_value1, Logical_value2, ...Logical_valueN) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| AND | Returns TRUE if all arguments are TRUE. | AND(Logical_value1, ...) | +| FALSE | Returns the logical value FALSE. | FALSE() | +| IF | Specifies a logical test to be performed. | IF(Test, Then_value, [Otherwise_value]) | +| IFERROR | Returns the value if the cell does not contains an error value, or the alternative value if it does. | IFERROR(Value, Alternate_value) | +| IFNA | Returns the value if the cell does not contains the #N/A (value not available) error value, or the alternative value if it does. | IFNA(Value, Alternate_value) | +| IFS | Evaluates multiple logical tests and returns a value that corresponds to the first true condition. | IFS(Condition1, Value1, ...) | +| NOT | Complements (inverts) a logical value. | NOT(Logicalvalue) | +| OR | Returns TRUE if at least one argument is TRUE. | OR(Logical_value1, ...) | +| SWITCH | Evaluates a list of arguments, consisting of an expression followed by a value. | SWITCH(Expression1, Value1, Expression2, ...) | +| TRUE | The logical value is set to TRUE. | TRUE() | +| XOR | Returns true if an odd number of arguments evaluates to TRUE. | XOR(Logical_value1, ...) | ### Lookup and reference -| Function ID | Description | Syntax | -|:------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------| -| ADDRESS | Returns a cell reference as a string. | ADDRESS(Row, Column[, AbsoluteRelativeMode[, UseA1Notation[, Sheet]]]) | -| CHOOSE | Uses an index to return a value from a list of values. | CHOOSE(Index, Value1, Value2, ...ValueN) | -| COLUMN | Returns column number of a given reference or formula reference if argument not provided. | COLUMNS([Reference]) | -| COLUMNS | Returns the number of columns in the given reference. | COLUMNS(Array) | -| FORMULATEXT | Returns a formula in a given cell as a string. | FORMULATEXT(Reference) | -| HLOOKUP | Searches horizontally with reference to adjacent cells to the bottom. | HLOOKUP(Search_Criterion, Array, Index, Sort_Order) | -| HYPERLINK | Stores the url in the cell's metadata. It can be read using method [`getCellHyperlink`](../api/classes/hyperformula.md#getcellhyperlink) | HYPERLINK(Url[, LinkLabel]) | -| INDEX | Returns the contents of a cell specified by row and column number. The column number is optional and defaults to 1. | INDEX(Range, Row [, Column]) | -| MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, LookupArray [, MatchType]) | -| OFFSET | Returns the value of a cell offset by a certain number of rows and columns from a given reference point. | OFFSET(Reference, Rows, Columns, Height, Width) | -| ROW | Returns row number of a given reference or formula reference if argument not provided. | ROW([Reference]) | -| ROWS | Returns the number of rows in the given reference. | ROWS(Array) | -| VLOOKUP | Searches vertically with reference to adjacent cells to the right. | VLOOKUP(Search_Criterion, Array, Index, Sort_Order) | -| XLOOKUP | Searches for a key in a range and returns the item corresponding to the match it finds. If no match exists, then XLOOKUP can return the closest (approximate) match. | XLOOKUP(LookupValue, LookupArray, ReturnArray, [IfNotFound], [MatchMode], [SearchMode]) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| ADDRESS | Returns a cell reference as a string. | ADDRESS(Row, Column, [AbsoluteRelativeMode], [UseA1Notation], [Sheet]) | +| CHOOSE | Uses an index to return a value from a list of values. | CHOOSE(Index, Value1, ...) | +| COLUMN | Returns column number of a given reference or formula reference if argument not provided. | COLUMN([Reference]) | +| COLUMNS | Returns the number of columns in the given reference. | COLUMNS(Array) | +| FORMULATEXT | Returns a formula in a given cell as a string. | FORMULATEXT(Reference) | +| HLOOKUP | Searches horizontally with reference to adjacent cells to the bottom. | HLOOKUP(Search_Criterion, Array, Index, [Sort_Order]) | +| HYPERLINK | Stores the url in the cell's metadata. It can be read using method [`getCellHyperlink`](../api/classes/hyperformula.md#getcellhyperlink) | HYPERLINK(Url, [LinkLabel]) | +| INDEX | Returns the contents of a cell specified by row and column number. The column number is optional and defaults to 1. | INDEX(Range, Row, [Column]) | +| MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, LookupArray, [MatchType]) | +| ROW | Returns row number of a given reference or formula reference if argument not provided. | ROW([Reference]) | +| ROWS | Returns the number of rows in the given reference. | ROWS(Array) | +| VLOOKUP | Searches vertically with reference to adjacent cells to the right. | VLOOKUP(Search_Criterion, Array, Index, [Sort_Order]) | +| XLOOKUP | Searches for a key in a range and returns the item corresponding to the match it finds. If no match exists, then XLOOKUP can return the closest (approximate) match. | XLOOKUP(LookupValue, LookupArray, ReturnArray, [IfNotFound], [MatchMode], [SearchMode]) | ### Math and trigonometry -| Function ID | Description | Syntax | -|:----------------|:--------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------| -| ABS | Returns the absolute value of a number. | ABS(Number) | -| ACOS | Returns the inverse trigonometric cosine of a number. | ACOS(Number) | -| ACOSH | Returns the inverse hyperbolic cosine of a number. | ACOSH(Number) | -| ACOT | Returns the inverse trigonometric cotangent of a number. | ACOT(Number) | -| ACOTH | Returns the inverse hyperbolic cotangent of a number. | ACOTH(Number) | -| ARABIC | Converts number from roman form. | ARABIC(String) | -| ASIN | Returns the inverse trigonometric sine of a number. | ASIN(Number) | -| ASINH | Returns the inverse hyperbolic sine of a number. | ASINH(Number) | -| ATAN | Returns the inverse trigonometric tangent of a number. | ATAN(Number) | -| ATAN2 | Returns the inverse trigonometric tangent of the specified x and y coordinates. | ATAN2(Numberx, Numbery) | -| ATANH | Returns the inverse hyperbolic tangent of a number. | ATANH(Number) | -| BASE | Converts a positive integer to a specified base into a text from the numbering system. | BASE(Number, Radix, [Minimumlength]) | -| CEILING | Rounds a number up to the nearest multiple of Significance. | CEILING(Number, Significance) | -| CEILING.MATH | Rounds a number up to the nearest multiple of Significance. | CEILING.MATH(Number[, Significance[, Mode]]) | -| CEILING.PRECISE | Rounds a number up to the nearest multiple of Significance. | CEILING.PRECISE(Number[, Significance]) | -| COMBIN | Returns number of combinations (without repetitions). | COMBIN(Number, Number) | -| COMBINA | Returns number of combinations (with repetitions). | COMBINA(Number, Number) | -| COS | Returns the cosine of the given angle (in radians). | COS(Number) | -| COSH | Returns the hyperbolic cosine of the given value. | COSH(Number) | -| COT | Returns the cotangent of the given angle (in radians). | COT(Number) | -| COTH | Returns the hyperbolic cotangent of the given value. | COTH(Number) | -| COUNTUNIQUE | Counts the number of unique values in a list of specified values and ranges. | COUNTUNIQUE(Value1, Value2, ...ValueN) | -| CSC | Returns the cosecant of the given angle (in radians). | CSC(Number) | -| CSCH | Returns the hyperbolic cosecant of the given value. | CSCH(Number) | -| DECIMAL | Converts text with characters from a number system to a positive integer in the base radix given. | DECIMAL("Text", Radix) | -| DEGREES | Converts radians into degrees. | DEGREES(Number) | -| EVEN | Rounds a positive number up to the next even integer and a negative number down to the next even integer. | EVEN(Number) | -| EXP | Returns constant e raised to the power of a number. | EXP(Number) | -| FACT | Returns a factorial of a number. | FACT(Number) | -| FACTDOUBLE | Returns a double factorial of a number. | FACTDOUBLE(Number) | -| FLOOR | Rounds a number down to the nearest multiple of Significance. | FLOOR(Number, Significance) | -| FLOOR.MATH | Rounds a number down to the nearest multiple of Significance. | FLOOR.MATH(Number[, Significance[, Mode]]) | -| FLOOR.PRECISE | Rounds a number down to the nearest multiple of Significance. | FLOOR.PRECISE(Number[, Significance]) | -| GCD | Computes greatest common divisor of numbers. | GCD(Number1, Number2, ...NumberN) | -| INT | Rounds a number down to the nearest integer. | INT(Number) | -| ISO.CEILING | Rounds a number up to the nearest multiple of Significance. | ISO.CEILING(Number[, Significance]) | -| LCM | Computes least common multiple of numbers. | LCM(Number1, Number2, ...NumberN) | -| LN | Returns the natural logarithm based on the constant e of a number. | LN(Number) | -| LOG | Returns the logarithm of a number to the specified base. | LOG(Number, Base) | -| LOG10 | Returns the base-10 logarithm of a number. | LOG10(Number) | -| MOD | Returns the remainder when one integer is divided by another. | MOD(Dividend, Divisor) | -| MROUND | Rounds number to the neares multiplicity. | MROUND(Number, Base) | -| MULTINOMIAL | Returns number of multiset combinations. | MULTINOMIAL(Number1, Number2, ...NumberN) | -| ODD | Rounds a positive number up to the nearest odd integer and a negative number down to the nearest odd integer. | ODD(Number) | -| PI | Returns 3.14159265358979, the value of the mathematical constant PI to 14 decimal places. | PI() | -| POWER | Returns a number raised to another number. | POWER(Base, Exponent) | -| PRODUCT | Returns product of numbers. | PRODUCT(Number1, Number2, ...NumberN) | -| QUOTIENT | Returns integer part of a division. | QUOTIENT(Dividend, Divisor) | -| RADIANS | Converts degrees to radians. | RADIANS(Number) | -| RAND | Returns a random number between 0 and 1. | RAND() | -| RANDBETWEEN | Returns a random integer between two numbers. | RAND(Lowerbound, Upperbound) | -| ROMAN | Converts number to roman form. | ROMAN(Number[, Mode]) | -| ROUND | Rounds a number to a certain number of decimal places. | ROUND(Number, Count) | -| ROUNDDOWN | Rounds a number down, toward zero, to a certain precision. | ROUNDDOWN(Number, Count) | -| ROUNDUP | Rounds a number up, away from zero, to a certain precision. | ROUNDUP(Number, Count) | -| SEC | Returns the secant of the given angle (in radians). | SEC(Number) | -| SECH | Returns the hyperbolic secant of the given angle (in radians). | SEC(Number) | -| SERIESSUM | Evaluates series at a point. | SERIESSUM(Number, Number, Number, Coefficients) | -| SIN | Returns the sine of the given angle (in radians). | SIN(Number) | -| SINH | Returns the hyperbolic sine of the given value. | SINH(Number) | -| SIGN | Returns sign of a number. | SIGN(Number) | -| SQRT | Returns the positive square root of a number. | SQRT(Number) | -| SQRTPI | Returns sqrt of number times pi. | SQRTPI(Number) | -| SUBTOTAL | Computes aggregation using function specified by number. | SUBTOTAL(Function, Number1, Number2, ...NumberN) | -| SUM | Sums up the values of the specified cells. | SUM(Number1, Number2, ...NumberN) | -| SUMIF | Sums up the values of cells that belong to the specified range and meet the specified condition. | SUMIF(Range, Criteria, Sumrange) | -| SUMIFS | Sums up the values of cells that belong to the specified range and meet the specified sets of conditions. | SUMIFS(Sum_Range, Criterion_range1, Criterion1 [, Criterion_range2, Criterion2 [, ...Criterion_rangeN, CriterionN]]) | -| SUMPRODUCT | Multiplies corresponding elements in the given arrays, and returns the sum of those products. | SUMPRODUCT(Array1, Array2, ...ArrayN) | -| SUMSQ | Returns the sum of the squares of the arguments | SUMSQ(Number1, Number2, ...NumberN) | -| SUMX2MY2 | Returns the sum of the square differences. | SUMX2MY2(Range1, Range2) | -| SUMX2PY2 | Returns the sum of the square sums. | SUMX2PY2(Range1, Range2) | -| SUMXMY2 | Returns the sum of the square of differences. | SUMXMY2(Range1, Range2) | -| TAN | Returns the tangent of the given angle (in radians). | TAN(Number) | -| TANH | Returns the hyperbolic tangent of the given value. | TANH(Number) | -| TRUNC | Truncates a number by removing decimal places. | TRUNC(Number, Count) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| ABS | Returns the absolute value of a number. | ABS(Number) | +| ACOS | Returns the inverse trigonometric cosine of a number. | ACOS(Number) | +| ACOSH | Returns the inverse hyperbolic cosine of a number. | ACOSH(Number) | +| ACOT | Returns the inverse trigonometric cotangent of a number. | ACOT(Number) | +| ACOTH | Returns the inverse hyperbolic cotangent of a number. | ACOTH(Number) | +| ARABIC | Converts number from roman form. | ARABIC(String) | +| ASIN | Returns the inverse trigonometric sine of a number. | ASIN(Number) | +| ASINH | Returns the inverse hyperbolic sine of a number. | ASINH(Number) | +| ATAN | Returns the inverse trigonometric tangent of a number. | ATAN(Number) | +| ATAN2 | Returns the inverse trigonometric tangent of the specified x and y coordinates. | ATAN2(Numberx, Numbery) | +| ATANH | Returns the inverse hyperbolic tangent of a number. | ATANH(Number) | +| BASE | Converts a positive integer to a specified base into a text from the numbering system. | BASE(Number, Radix, [Minimumlength]) | +| CEILING | Rounds a number up to the nearest multiple of Significance. | CEILING(Number, Significance) | +| CEILING.MATH | Rounds a number up to the nearest multiple of Significance. | CEILING.MATH(Number, [Significance], [Mode]) | +| CEILING.PRECISE | Rounds a number up to the nearest multiple of Significance. | CEILING.PRECISE(Number, [Significance]) | +| COMBIN | Returns number of combinations (without repetitions). | COMBIN(Number1, Number2) | +| COMBINA | Returns number of combinations (with repetitions). | COMBINA(Number1, Number2) | +| COS | Returns the cosine of the given angle (in radians). | COS(Number) | +| COSH | Returns the hyperbolic cosine of the given value. | COSH(Number) | +| COT | Returns the cotangent of the given angle (in radians). | COT(Number) | +| COTH | Returns the hyperbolic cotangent of the given value. | COTH(Number) | +| COUNTUNIQUE | Counts the number of unique values in a list of specified values and ranges. | COUNTUNIQUE(Value1, ...) | +| CSC | Returns the cosecant of the given angle (in radians). | CSC(Number) | +| CSCH | Returns the hyperbolic cosecant of the given value. | CSCH(Number) | +| DECIMAL | Converts text with characters from a number system to a positive integer in the base radix given. | DECIMAL(Text, Radix) | +| DEGREES | Converts radians into degrees. | DEGREES(Number) | +| EVEN | Rounds a positive number up to the next even integer and a negative number down to the next even integer. | EVEN(Number) | +| EXP | Returns constant e raised to the power of a number. | EXP(Number) | +| FACT | Returns a factorial of a number. | FACT(Number) | +| FACTDOUBLE | Returns a double factorial of a number. | FACTDOUBLE(Number) | +| FLOOR | Rounds a number down to the nearest multiple of Significance. | FLOOR(Number, Significance) | +| FLOOR.MATH | Rounds a number down to the nearest multiple of Significance. | FLOOR.MATH(Number, [Significance], [Mode]) | +| FLOOR.PRECISE | Rounds a number down to the nearest multiple of Significance. | FLOOR.PRECISE(Number, [Significance]) | +| GCD | Computes greatest common divisor of numbers. | GCD(Number1, ...) | +| INT | Rounds a number down to the nearest integer. | INT(Number) | +| ISO.CEILING | Rounds a number up to the nearest multiple of Significance. | ISO.CEILING(Number, [Significance]) | +| LCM | Computes least common multiple of numbers. | LCM(Number1, ...) | +| LN | Returns the natural logarithm based on the constant e of a number. | LN(Number) | +| LOG | Returns the logarithm of a number to the specified base. | LOG(Number, [Base]) | +| LOG10 | Returns the base-10 logarithm of a number. | LOG10(Number) | +| MOD | Returns the remainder when one integer is divided by another. | MOD(Dividend, Divisor) | +| MROUND | Rounds number to the neares multiplicity. | MROUND(Number, Base) | +| MULTINOMIAL | Returns number of multiset combinations. | MULTINOMIAL(Number1, ...) | +| ODD | Rounds a positive number up to the nearest odd integer and a negative number down to the nearest odd integer. | ODD(Number) | +| PI | Returns 3.14159265358979, the value of the mathematical constant PI to 14 decimal places. | PI() | +| POWER | Returns a number raised to another number. | POWER(Base, Exponent) | +| PRODUCT | Returns product of numbers. | PRODUCT(Number1, ...) | +| QUOTIENT | Returns integer part of a division. | QUOTIENT(Dividend, Divisor) | +| RADIANS | Converts degrees to radians. | RADIANS(Number) | +| RAND | Returns a random number between 0 and 1. | RAND() | +| RANDBETWEEN | Returns a random integer between two numbers. | RANDBETWEEN(Lowerbound, Upperbound) | +| ROMAN | Converts number to roman form. | ROMAN(Number, [Mode]) | +| ROUND | Rounds a number to a certain number of decimal places. | ROUND(Number, [Count]) | +| ROUNDDOWN | Rounds a number down, toward zero, to a certain precision. | ROUNDDOWN(Number, [Count]) | +| ROUNDUP | Rounds a number up, away from zero, to a certain precision. | ROUNDUP(Number, [Count]) | +| SEC | Returns the secant of the given angle (in radians). | SEC(Number) | +| SECH | Returns the hyperbolic secant of the given angle (in radians). | SECH(Number) | +| SERIESSUM | Evaluates series at a point. | SERIESSUM(Number1, Number2, Number3, Coefficients) | +| SIGN | Returns sign of a number. | SIGN(Number) | +| SIN | Returns the sine of the given angle (in radians). | SIN(Number) | +| SINH | Returns the hyperbolic sine of the given value. | SINH(Number) | +| SQRT | Returns the positive square root of a number. | SQRT(Number) | +| SQRTPI | Returns sqrt of number times pi. | SQRTPI(Number) | +| SUBTOTAL | Computes aggregation using function specified by number. | SUBTOTAL(Function, Number1, ...) | +| SUM | Sums up the values of the specified cells. | SUM(Number1, ...) | +| SUMIF | Sums up the values of cells that belong to the specified range and meet the specified condition. | SUMIF(Range, Criteria, [Sumrange]) | +| SUMIFS | Sums up the values of cells that belong to the specified range and meet the specified sets of conditions. | SUMIFS(Sum_Range, Criterion_range1, Criterion1, ...) | +| SUMPRODUCT | Multiplies corresponding elements in the given arrays, and returns the sum of those products. | SUMPRODUCT(Array1, ...) | +| SUMSQ | Returns the sum of the squares of the arguments | SUMSQ(Number1, ...) | +| SUMX2MY2 | Returns the sum of the square differences. | SUMX2MY2(Range1, Range2) | +| SUMX2PY2 | Returns the sum of the square sums. | SUMX2PY2(Range1, Range2) | +| SUMXMY2 | Returns the sum of the square of differences. | SUMXMY2(Range1, Range2) | +| TAN | Returns the tangent of the given angle (in radians). | TAN(Number) | +| TANH | Returns the hyperbolic tangent of the given value. | TANH(Number) | +| TRUNC | Rounds a number down, toward zero, to a certain precision. | TRUNC(Number, [Count]) | ### Matrix functions -| Function ID | Description | Syntax | -|:------------|:------------------------------------------------------------------------------------------------------------|:---------------------------------------| -| MMULT | Calculates the array product of two arrays. | MMULT(Array, Array) | -| MEDIANPOOL | Calculates a smaller range which is a median of a Window_size, in a given Range, for every Stride element. | MEDIANPOOL(Range, Window_size, Stride) | -| MAXPOOL | Calculates a smaller range which is a maximum of a Window_size, in a given Range, for every Stride element. | MAXPOOL(Range, Window_size, Stride) | -| TRANSPOSE | Transposes the rows and columns of an array. | TRANSPOSE(Array) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| MAXPOOL | Calculates a smaller range which is a maximum of a Window_size, in a given Range, for every Stride element. | MAXPOOL(Range, Window_size, [Stride]) | +| MEDIANPOOL | Calculates a smaller range which is a median of a Window_size, in a given Range, for every Stride element. | MEDIANPOOL(Range, Window_size, [Stride]) | +| MMULT | Calculates the array product of two arrays. | MMULT(Array1, Array2) | +| TRANSPOSE | Transposes the rows and columns of an array. | TRANSPOSE(Array) | ### Operator -| Function ID | Description | Syntax | -|:-----------------|:---------------------------------------------|:----------------------------| -| HF.ADD | Adds two values. | HF.ADD(Number, Number) | -| HF.CONCAT | Concatenates two strings. | HF.CONCAT(String, String) | -| HF.DIVIDE | Divides two values. | HF.DIVIDE(Number, Number) | -| HF.EQ | Tests two values for equality. | HF.EQ(Value, Value) | -| HF.LTE | Tests two values for less-equal relation. | HF.LEQ(Value, Value) | -| HF.LT | Tests two values for less-than relation. | HF.LT(Value, Value) | -| HF.GTE | Tests two values for greater-equal relation. | HF.GEQ(Value, Value) | -| HF.GT | Tests two values for greater-than relation. | HF.GT(Value, Value) | -| HF.MINUS | Subtracts two values. | HF.MINUS(Number, Number) | -| HF.MULTIPLY | Multiplies two values. | HF.MULTIPLY(Number, Number) | -| HF.NE | Tests two values for inequality. | HF.NE(Value, Value) | -| HF.POW | Computes power of two values. | HF.POW(Number, Number) | -| HF.UMINUS | Negates the value. | HF.UMINUS(Number) | -| HF.UNARY_PERCENT | Applies percent operator. | HF.UNARY_PERCENT(Number) | -| HF.UPLUS | Applies unary plus. | HF.UPLUS(Number) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| HF.ADD | Adds two values. | HF.ADD(Number1, Number2) | +| HF.CONCAT | Concatenates two strings. | HF.CONCAT(String1, String2) | +| HF.DIVIDE | Divides two values. | HF.DIVIDE(Number1, Number2) | +| HF.EQ | Tests two values for equality. | HF.EQ(Value1, Value2) | +| HF.GT | Tests two values for greater-than relation. | HF.GT(Value1, Value2) | +| HF.GTE | Tests two values for greater-equal relation. | HF.GTE(Value1, Value2) | +| HF.LT | Tests two values for less-than relation. | HF.LT(Value1, Value2) | +| HF.LTE | Tests two values for less-equal relation. | HF.LTE(Value1, Value2) | +| HF.MINUS | Subtracts two values. | HF.MINUS(Number1, Number2) | +| HF.MULTIPLY | Multiplies two values. | HF.MULTIPLY(Number1, Number2) | +| HF.NE | Tests two values for inequality. | HF.NE(Value1, Value2) | +| HF.POW | Computes power of two values. | HF.POW(Number1, Number2) | +| HF.UMINUS | Negates the value. | HF.UMINUS(Number) | +| HF.UNARY_PERCENT | Applies percent operator. | HF.UNARY_PERCENT(Number) | +| HF.UPLUS | Applies unary plus. | HF.UPLUS(Number) | ### Statistical -| Function ID | Description | Syntax | -|:----------------|:----------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------| -| AVEDEV | Returns the average deviation of the arguments. | AVEDEV(Number1, Number2, ...NumberN) | -| AVERAGE | Returns the average of the arguments. | AVERAGE(Number1, Number2, ...NumberN) | -| AVERAGEA | Returns the average of the arguments. | AVERAGEA(Value1, Value2, ...ValueN) | -| AVERAGEIF | Returns the arithmetic mean of all cells in a range that satisfy a given condition. | AVERAGEIF(Range, Criterion [, Average_Range ]) | -| BESSELI | Returns value of Bessel function. | BESSELI(x, n) | -| BESSELJ | Returns value of Bessel function. | BESSELJ(x, n) | -| BESSELK | Returns value of Bessel function. | BESSELK(x, n) | -| BESSELY | Returns value of Bessel function. | BESSELY(x, n) | -| BETA.DIST | Returns the density of Beta distribution. | BETA.DIST(Number1, Number2, Number3, Boolean[, Number4[, Number5]]) | -| BETADIST | Returns the density of Beta distribution. | BETADIST(Number1, Number2, Number3, Boolean[, Number4[, Number5]]) | -| BETA.INV | Returns the inverse Beta distribution value. | BETA.INV(Number1, Number2, Number3[, Number4[, Number5]]) | -| BETAINV | Returns the inverse of Beta distribution value. | BETAINV(Number1, Number2, Number3[, Number4[, Number5]]) | -| BINOM.DIST | Returns density of binomial distribution. | BINOM.DIST(Number1, Number2, Number3, Boolean) | -| BINOMDIST | Returns density of binomial distribution. | BINOMDIST(Number1, Number2, Number3, Boolean) | -| BINOM.INV | Returns inverse binomial distribution value. | BINOM.INV(Number1, Number2, Number3) | -| CHIDIST | Returns probability of chi-square right-side distribution. | CHIDIST(X, Degrees) | -| CHIINV | Returns inverse of chi-square right-side distribution. | CHIINV(P, Degrees) | -| CHIINVRT | Returns inverse of chi-square right-side distribution. | CHIINVRT(P, Degrees) | -| CHISQ.DIST | Returns value of chi-square distribution. | CHISQ.DIST(X, Degrees, Mode) | -| CHIDISTRT | Returns probability of chi-square right-side distribution. | CHIDISTRT(X, Degrees) | -| CHISQ.DIST.RT | Returns probability of chi-square right-side distribution. | CHISQ.DIST.RT(X, Degrees) | -| CHISQ.INV | Returns inverse of chi-square distribution. | CHISQ.INV.RT(P, Degrees) | -| CHISQ.INV.RT | Returns inverse of chi-square right-side distribution. | CHISQ.INV.RT(P, Degrees) | -| CHISQ.TEST | Returns chisquared-test value for a dataset. | CHISQ.TEST(Array1, Array2) | -| CHITEST | Returns chisquared-test value for a dataset. | CHITEST(Array1, Array2) | -| CONFIDENCE | Returns upper confidence bound for normal distribution. | CONFIDENCE(Alpha, Stdev, Size) | -| CONFIDENCE.NORM | Returns upper confidence bound for normal distribution. | CONFIDENCE.NORM(Alpha, Stdev, Size) | -| CONFIDENCE.T | Returns upper confidence bound for T distribution. | CONFIDENCE.T(Alpha, Stdev, Size) | -| CORREL | Returns the correlation coefficient between two data sets. | CORREL(Data1, Data2) | -| COUNT | Counts how many numbers are in the list of arguments. | COUNT(Value1, Value2, ...ValueN) | -| COUNTA | Counts how many values are in the list of arguments. | COUNTA(Value1, Value2, ...ValueN) | -| COUNTBLANK | Returns the number of empty cells. | COUNTBLANK(Range) | -| COUNTIF | Returns the number of cells that meet with certain criteria within a cell range. | COUNTIF(Range, Criteria) | -| COUNTIFS | Returns the count of rows or columns that meet criteria in multiple ranges. | COUNTIFS(Range1, Criterion1 [, Range2, Criterion2 [, ...RangeN, CriterionN]]) | -| COVAR | Returns the covariance between two data sets, population normalized. | COVAR(Data1, Data2) | -| COVARIANCE.P | Returns the covariance between two data sets, population normalized. | COVARIANCE.P(Data1, Data2) | -| COVARIANCEP | Returns the covariance between two data sets, population normalized. | COVARIANCEP(Data1, Data2) | -| COVARIANCE.S | Returns the covariance between two data sets, sample normalized. | COVARIANCE.S(Data1, Data2) | -| COVARIANCES | Returns the covariance between two data sets, sample normalized. | COVARIANCES(Data1, Data2) | -| CRITBINOM | Returns inverse binomial distribution value. | CRITBINOM(Number1, Number2, Number3) | -| DEVSQ | Returns sum of squared deviations. | DEVSQ(Number1, Number2, ...NumberN) | -| EXPON.DIST | Returns density of a exponential distribution. | EXPON.DIST(Number1, Number2, Boolean) | -| EXPONDIST | Returns density of a exponential distribution. | EXPONDIST(Number1, Number2, Boolean) | -| FDIST | Returns probability of F right-side distribution. | FDIST(X, Degree1, Degree2) | -| FINV | Returns inverse of F right-side distribution. | FINV(P, Degree1, Degree2) | -| F.DIST | Returns value of F distribution. | F.DIST(X, Degree1, Degree2, Mode) | -| F.DIST.RT | Returns probability of F right-side distribution. | F.DIST.RT(X, Degree1, Degree2) | -| FDISTRT | Returns probability of F right-side distribution. | FDISTRT(X, Degree1, Degree2) | -| F.INV | Returns inverse of F distribution. | F.INV.RT(P, Degree1, Degree2) | -| F.INV.RT | Returns inverse of F right-side distribution. | F.INV.RT(P, Degree1, Degree2) | -| FINVRT | Returns inverse of F right-side distribution. | FINVRT(P, Degree1, Degree2) | -| FISHER | Returns Fisher transformation value. | FISHER(Number) | -| FISHERINV | Returns inverse Fischer transformation value. | FISHERINV(Number) | -| F.TEST | Returns f-test value for a dataset. | Z.TEST(Array1, Array2) | -| FTEST | Returns f-test value for a dataset. | ZTEST(Array1, Array2) | -| GAMMA | Returns value of Gamma function. | GAMMA(Number) | -| GAMMA.DIST | Returns density of Gamma distribution. | GAMMA.DIST(Number1, Number2, Number3, Boolean) | -| GAMMADIST | Returns density of Gamma distribution. | GAMMADIST(Number1, Number2, Number3, Boolean) | -| GAMMALN | Returns natural logarithm of Gamma function. | GAMMALN(Number) | -| GAMMALN.PRECISE | Returns natural logarithm of Gamma function. | GAMMALN.PRECISE(Number) | -| GAMMA.INV | Returns inverse Gamma distribution value. | GAMMA.INV(Number1, Number2, Number3) | -| GAMMAINV | Returns inverse Gamma distribution value. | GAMMAINV(Number1, Number2, Number3) | -| GAUSS | Returns the probability of gaussian variable falling more than this many times standard deviation from mean. | GAUSS(Number) | -| GEOMEAN | Returns the geometric average. | GEOMEAN(Number1, Number2, ...NumberN) | -| HARMEAN | Returns the harmonic average. | HARMEAN(Number1, Number2, ...NumberN) | -| HYPGEOMDIST | Returns density of hypergeometric distribution. | HYPGEOMDIST(Number1, Number2, Number3, Number4, Boolean) | -| HYPGEOM.DIST | Returns density of hypergeometric distribution. | HYPGEOM.DIST(Number1, Number2, Number3, Number4, Boolean) | -| LARGE | Returns k-th largest value in a range. | LARGE(Range, K) | -| LOGNORM.DIST | Returns density of lognormal distribution. | LOGNORM.DIST(X, Mean, Stddev, Mode) | -| LOGNORMDIST | Returns density of lognormal distribution. | LOGNORMDIST(X, Mean, Stddev, Mode) | -| LOGNORM.INV | Returns value of inverse lognormal distribution. | LOGNORM.INV(P, Mean, Stddev) | -| LOGNORMINV | Returns value of inverse lognormal distribution. | LOGNORMINV(P, Mean, Stddev) | -| LOGINV | Returns value of inverse lognormal distribution. | LOGINV(P, Mean, Stddev) | -| MAX | Returns the maximum value in a list of arguments. | MAX(Number1, Number2, ...NumberN) | -| MAXA | Returns the maximum value in a list of arguments. | MAXA(Value1, Value2, ...ValueN) | -| MAXIFS | Returns the maximum value of the cells in a range that meet a set of criteria. | MAXIFS(Max_Range, Criterion_range1, Criterion1 [, Criterion_range2, Criterion2 [, ...Criterion_rangeN, CriterionN]]) | -| MEDIAN | Returns the median of a set of numbers. | MEDIAN(Number1, Number2, ...NumberN) | -| MIN | Returns the minimum value in a list of arguments. | MIN(Number1, Number2, ...NumberN) | -| MINA | Returns the minimum value in a list of arguments. | MINA(Value1, Value2, ...ValueN) | -| MINIFS | Returns the minimum value of the cells in a range that meet a set of criteria. | MINIFS(Min_Range, Criterion_range1, Criterion1 [, Criterion_range2, Criterion2 [, ...Criterion_rangeN, CriterionN]]) | -| NEGBINOM.DIST | Returns density of negative binomial distribution. | NEGBINOM.DIST(Number1, Number2, Number3, Mode) | -| NEGBINOMDIST | Returns density of negative binomial distribution. | NEGBINOMDIST(Number1, Number2, Number3, Mode) | -| NORM.DIST | Returns density of normal distribution. | NORM.DIST(X, Mean, Stddev, Mode) | -| NORMDIST | Returns density of normal distribution. | NORMDIST(X, Mean, Stddev, Mode) | -| NORM.S.DIST | Returns density of normal distribution. | NORM.S.DIST(X, Mode) | -| NORMDIST | Returns density of normal distribution. | NORMSDIST(X, Mode) | -| NORM.INV | Returns value of inverse normal distribution. | NORM.INV(P, Mean, Stddev) | -| NORMINV | Returns value of inverse normal distribution. | NORMINV(P, Mean, Stddev) | -| NORM.S.INV | Returns value of inverse normal distribution. | NORM.S.INV(P) | -| NORMSINV | Returns value of inverse normal distribution. | NORMSINV(P) | -| PEARSON | Returns the correlation coefficient between two data sets. | PEARSON(Data1, Data2) | -| PHI | Returns probability densitity of normal distribution. | PHI(X) | -| PERCENTILE | Returns the k-th percentile of values in a range, inclusive of 0 and 1. | PERCENTILE(Data, K) | -| PERCENTILE.EXC | Returns the k-th percentile of values in a range, exclusive of 0 and 1. | PERCENTILE.EXC(Data, K) | -| PERCENTILE.INC | Returns the k-th percentile of values in a range, inclusive of 0 and 1. | PERCENTILE.INC(Data, K) | -| POISSON | Returns density of Poisson distribution. | POISSON(X, Mean, Mode) | -| POISSON.DIST | Returns density of Poisson distribution. | POISSON.DIST(X, Mean, Mode) | -| POISSONDIST | Returns density of Poisson distribution. | POISSONDIST(X, Mean, Mode) | -| QUARTILE | Returns the quartile of a data set, based on inclusive percentile values. | QUARTILE(Data, Quart) | -| QUARTILE.EXC | Returns the quartile of a data set, based on exclusive percentile values. | QUARTILE.EXC(Data, Quart) | -| QUARTILE.INC | Returns the quartile of a data set, based on inclusive percentile values. | QUARTILE.INC(Data, Quart) | -| RSQ | Returns the squared correlation coefficient between two data sets. | RSQ(Data1, Data2) | -| SKEW | Returns skeweness of a sample. | SKEW(Number1, Number2, ...NumberN) | -| SKEW.P | Returns skeweness of a population. | SKEW.P(Number1, Number2, ...NumberN) | -| SKEWP | Returns skeweness of a population. | SKEWP(Number1, Number2, ...NumberN) | -| SLOPE | Returns the slope of a linear regression line. | SLOPE(Array1, Array2) | -| SMALL | Returns k-th smallest value in a range. | SMALL(Range, K) | -| STANDARDIZE | Returns normalized value wrt expected value and standard deviation. | STANDARDIZE(X, Mean, Stddev) | -| STDEV | Returns standard deviation of a sample. | STDEV(Value1, Value2, ...ValueN) | -| STDEVA | Returns standard deviation of a sample. | STDEVA(Value1, Value2, ...ValueN) | -| STDEVP | Returns standard deviation of a population. | STDEVP(Value1, Value2, ...ValueN) | -| STDEV.P | Returns standard deviation of a population. | STDEV.P(Value1, Value2, ...ValueN) | -| STDEVPA | Returns standard deviation of a population. | STDEVPA(Value1, Value2, ...ValueN) | -| STDEV.S | Returns standard deviation of a sample. | STDEV.S(Value1, Value2, ...ValueN) | -| STDEVS | Returns standard deviation of a sample. | STDEVS(Value1, Value2, ...ValueN) | -| STEYX | Returns standard error for predicted of the predicted y value for each x value. | STEYX(Array1, Array2) | -| TDIST | Returns density of Student-t distribution, both-sided or right-tailed. | TDIST(X, Degrees, Mode) | -| T.DIST | Returns density of Student-t distribution. | T.DIST(X, Degrees, Mode) | -| T.DIST.2T | Returns density of Student-t distribution, both-sided. | T.DIST.2T(X, Degrees) | -| TDIST2T | Returns density of Student-t distribution, both-sided. | TDIST2T(X, Degrees) | -| T.DIST.RT | Returns density of Student-t distribution, right-tailed. | T.DIST.RT(X, Degrees) | -| TDISTRT | Returns density of Student-t distribution, right-tailed. | TDISTRT(X, Degrees) | -| TINV | Returns inverse Student-t distribution, both-sided. | TINV(P, Degrees) | -| T.INV | Returns inverse Student-t distribution. | T.INV(P, Degrees) | -| T.INV.2T | Returns inverse Student-t distribution, both-sided. | T.INV.2T(P, Degrees) | -| TINV2T | Returns inverse Student-t distribution, both-sided. | TINV2T(P, Degrees) | -| TTEST | Returns t-test value for a dataset. | TTEST(Array1, Array2) | -| T.TEST | Returns t-test value for a dataset. | T.TEST(Array1, Array2) | -| VAR | Returns variance of a sample. | VAR(Value1, Value2, ...ValueN) | -| VARA | Returns variance of a sample. | VARA(Value1, Value2, ...ValueN) | -| VARP | Returns variance of a population. | VARP(Value1, Value2, ...ValueN) | -| VAR.P | Returns variance of a population. | VAR.P(Value1, Value2, ...ValueN) | -| VARPA | Returns variance of a population. | VARPA(Value1, Value2, ...ValueN) | -| VAR.S | Returns variance of a sample. | VAR.S(Value1, Value2, ...ValueN) | -| VARS | Returns variance of a sample. | VARS(Value1, Value2, ...ValueN) | -| WEIBULL | Returns density of Weibull distribution. | WEIBULL(Number1, Number2, Number3, Boolean) | -| WEIBULL.DIST | Returns density of Weibull distribution. | WEIBULL.DIST(Number1, Number2, Number3, Boolean) | -| WEIBULLDIST | Returns density of Weibull distribution. | WEIBULLDIST(Number1, Number2, Number3, Boolean) | -| Z.TEST | Returns z-test value for a dataset. | Z.TEST(Array, X[, Sigma]) | -| ZTEST | Returns z-test value for a dataset. | ZTEST(Array, X[, Sigma]) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| AVEDEV | Returns the average deviation of the arguments. | AVEDEV(Number1, ...) | +| AVERAGE | Returns the average of the arguments. | AVERAGE(Number1, ...) | +| AVERAGEA | Returns the average of the arguments. | AVERAGEA(Value1, ...) | +| AVERAGEIF | Returns the arithmetic mean of all cells in a range that satisfy a given condition. | AVERAGEIF(Range, Criterion, [Average_Range]) | +| BESSELI | Returns value of Bessel function. | BESSELI(X, N) | +| BESSELJ | Returns value of Bessel function. | BESSELJ(X, N) | +| BESSELK | Returns value of Bessel function. | BESSELK(X, N) | +| BESSELY | Returns value of Bessel function. | BESSELY(X, N) | +| BETA.DIST | Returns the density of Beta distribution. | BETA.DIST(Number1, Number2, Number3, Boolean, [Number4], [Number5]) | +| BETA.INV | Returns the inverse Beta distribution value. | BETA.INV(Number1, Number2, Number3, [Number4], [Number5]) | +| BETADIST | Returns the density of Beta distribution. | BETADIST(Number1, Number2, Number3, Boolean, [Number4], [Number5]) | +| BETAINV | Returns the inverse Beta distribution value. | BETAINV(Number1, Number2, Number3, [Number4], [Number5]) | +| BINOM.DIST | Returns density of binomial distribution. | BINOM.DIST(Number1, Number2, Number3, Boolean) | +| BINOM.INV | Returns inverse binomial distribution value. | BINOM.INV(Number1, Number2, Number3) | +| BINOMDIST | Returns density of binomial distribution. | BINOMDIST(Number1, Number2, Number3, Boolean) | +| CHIDIST | Returns probability of chi-square right-side distribution. | CHIDIST(X, Degrees) | +| CHIDISTRT | Returns probability of chi-square right-side distribution. | CHIDISTRT(X, Degrees) | +| CHIINV | Returns inverse of chi-square right-side distribution. | CHIINV(P, Degrees) | +| CHIINVRT | Returns inverse of chi-square right-side distribution. | CHIINVRT(P, Degrees) | +| CHISQ.DIST | Returns value of chi-square distribution. | CHISQ.DIST(X, Degrees, Mode) | +| CHISQ.DIST.RT | Returns probability of chi-square right-side distribution. | CHISQ.DIST.RT(X, Degrees) | +| CHISQ.INV | Returns inverse of chi-square distribution. | CHISQ.INV(P, Degrees) | +| CHISQ.INV.RT | Returns inverse of chi-square right-side distribution. | CHISQ.INV.RT(P, Degrees) | +| CHISQ.TEST | Returns chisquared-test value for a dataset. | CHISQ.TEST(Array1, Array2) | +| CHITEST | Returns chisquared-test value for a dataset. | CHITEST(Array1, Array2) | +| CONFIDENCE | Returns upper confidence bound for normal distribution. | CONFIDENCE(Alpha, Stdev, Size) | +| CONFIDENCE.NORM | Returns upper confidence bound for normal distribution. | CONFIDENCE.NORM(Alpha, Stdev, Size) | +| CONFIDENCE.T | Returns upper confidence bound for T distribution. | CONFIDENCE.T(Alpha, Stdev, Size) | +| CORREL | Returns the correlation coefficient between two data sets. | CORREL(Data1, Data2) | +| COUNT | Counts how many numbers are in the list of arguments. | COUNT(Value1, ...) | +| COUNTA | Counts how many values are in the list of arguments. | COUNTA(Value1, ...) | +| COUNTBLANK | Returns the number of empty cells. | COUNTBLANK(Range, ...) | +| COUNTIF | Returns the number of cells that meet with certain criteria within a cell range. | COUNTIF(Range, Criteria) | +| COUNTIFS | Returns the count of rows or columns that meet criteria in multiple ranges. | COUNTIFS(Range1, Criterion1, ...) | +| COVAR | Returns the covariance between two data sets, population normalized. | COVAR(Data1, Data2) | +| COVARIANCE.P | Returns the covariance between two data sets, population normalized. | COVARIANCE.P(Data1, Data2) | +| COVARIANCE.S | Returns the covariance between two data sets, sample normalized. | COVARIANCE.S(Data1, Data2) | +| COVARIANCEP | Returns the covariance between two data sets, population normalized. | COVARIANCEP(Data1, Data2) | +| COVARIANCES | Returns the covariance between two data sets, sample normalized. | COVARIANCES(Data1, Data2) | +| CRITBINOM | Returns inverse binomial distribution value. | CRITBINOM(Number1, Number2, Number3) | +| DEVSQ | Returns sum of squared deviations. | DEVSQ(Number1, ...) | +| EXPON.DIST | Returns density of a exponential distribution. | EXPON.DIST(Number1, Number2, Boolean) | +| EXPONDIST | Returns density of a exponential distribution. | EXPONDIST(Number1, Number2, Boolean) | +| F.DIST | Returns value of F distribution. | F.DIST(X, Degree1, Degree2, Mode) | +| F.DIST.RT | Returns probability of F right-side distribution. | F.DIST.RT(X, Degree1, Degree2) | +| F.INV | Returns inverse of F distribution. | F.INV(P, Degree1, Degree2) | +| F.INV.RT | Returns inverse of F right-side distribution. | F.INV.RT(P, Degree1, Degree2) | +| F.TEST | Returns f-test value for a dataset. | F.TEST(Array1, Array2) | +| FDIST | Returns probability of F right-side distribution. | FDIST(X, Degree1, Degree2) | +| FDISTRT | Returns probability of F right-side distribution. | FDISTRT(X, Degree1, Degree2) | +| FINV | Returns inverse of F right-side distribution. | FINV(P, Degree1, Degree2) | +| FINVRT | Returns inverse of F right-side distribution. | FINVRT(P, Degree1, Degree2) | +| FISHER | Returns Fisher transformation value. | FISHER(Number) | +| FISHERINV | Returns inverse Fischer transformation value. | FISHERINV(Number) | +| FTEST | Returns f-test value for a dataset. | FTEST(Array1, Array2) | +| GAMMA | Returns value of Gamma function. | GAMMA(Number) | +| GAMMA.DIST | Returns density of Gamma distribution. | GAMMA.DIST(Number1, Number2, Number3, Boolean) | +| GAMMA.INV | Returns inverse Gamma distribution value. | GAMMA.INV(Number1, Number2, Number3) | +| GAMMADIST | Returns density of Gamma distribution. | GAMMADIST(Number1, Number2, Number3, Boolean) | +| GAMMAINV | Returns inverse Gamma distribution value. | GAMMAINV(Number1, Number2, Number3) | +| GAMMALN | Returns natural logarithm of Gamma function. | GAMMALN(Number) | +| GAMMALN.PRECISE | Returns natural logarithm of Gamma function. | GAMMALN.PRECISE(Number) | +| GAUSS | Returns the probability of gaussian variable falling more than this many times standard deviation from mean. | GAUSS(Number) | +| GEOMEAN | Returns the geometric average. | GEOMEAN(Number1, ...) | +| HARMEAN | Returns the harmonic average. | HARMEAN(Number1, ...) | +| HYPGEOM.DIST | Returns density of hypergeometric distribution. | HYPGEOM.DIST(Number1, Number2, Number3, Number4, Boolean) | +| HYPGEOMDIST | Returns density of hypergeometric distribution. | HYPGEOMDIST(Number1, Number2, Number3, Number4, Boolean) | +| LARGE | Returns k-th largest value in a range. | LARGE(Range, K) | +| LOGINV | Returns value of inverse lognormal distribution. | LOGINV(P, Mean, Stddev) | +| LOGNORM.DIST | Returns density of lognormal distribution. | LOGNORM.DIST(X, Mean, Stddev, Mode) | +| LOGNORM.INV | Returns value of inverse lognormal distribution. | LOGNORM.INV(P, Mean, Stddev) | +| LOGNORMDIST | Returns density of lognormal distribution. | LOGNORMDIST(X, Mean, Stddev, Mode) | +| LOGNORMINV | Returns value of inverse lognormal distribution. | LOGNORMINV(P, Mean, Stddev) | +| MAX | Returns the maximum value in a list of arguments. | MAX(Number1, ...) | +| MAXA | Returns the maximum value in a list of arguments. | MAXA(Value1, ...) | +| MAXIFS | Returns the maximum value of the cells in a range that meet a set of criteria. | MAXIFS(Max_Range, Criterion_range1, Criterion1, ...) | +| MEDIAN | Returns the median of a set of numbers. | MEDIAN(Number1, ...) | +| MIN | Returns the minimum value in a list of arguments. | MIN(Number1, ...) | +| MINA | Returns the minimum value in a list of arguments. | MINA(Value1, ...) | +| MINIFS | Returns the minimum value of the cells in a range that meet a set of criteria. | MINIFS(Min_Range, Criterion_range1, Criterion1, ...) | +| NEGBINOM.DIST | Returns density of negative binomial distribution. | NEGBINOM.DIST(Number1, Number2, Number3, Mode) | +| NEGBINOMDIST | Returns density of negative binomial distribution. | NEGBINOMDIST(Number1, Number2, Number3, Mode) | +| NORM.DIST | Returns density of normal distribution. | NORM.DIST(X, Mean, Stddev, Mode) | +| NORM.INV | Returns value of inverse normal distribution. | NORM.INV(P, Mean, Stddev) | +| NORM.S.DIST | Returns density of normal distribution. | NORM.S.DIST(X, Mode) | +| NORM.S.INV | Returns value of inverse normal distribution. | NORM.S.INV(P) | +| NORMDIST | Returns density of normal distribution. | NORMDIST(X, Mean, Stddev, Mode) | +| NORMINV | Returns value of inverse normal distribution. | NORMINV(P, Mean, Stddev) | +| NORMSDIST | Returns density of normal distribution. | NORMSDIST(X, Mode) | +| NORMSINV | Returns value of inverse normal distribution. | NORMSINV(P) | +| PEARSON | Returns the correlation coefficient between two data sets. | PEARSON(Data1, Data2) | +| PERCENTILE | Returns the k-th percentile of values in a range, inclusive of 0 and 1. | PERCENTILE(Data, K) | +| PERCENTILE.EXC | Returns the k-th percentile of values in a range, exclusive of 0 and 1. | PERCENTILE.EXC(Data, K) | +| PERCENTILE.INC | Returns the k-th percentile of values in a range, inclusive of 0 and 1. | PERCENTILE.INC(Data, K) | +| PHI | Returns probability densitity of normal distribution. | PHI(X) | +| POISSON | Returns density of Poisson distribution. | POISSON(X, Mean, Mode) | +| POISSON.DIST | Returns density of Poisson distribution. | POISSON.DIST(X, Mean, Mode) | +| POISSONDIST | Returns density of Poisson distribution. | POISSONDIST(X, Mean, Mode) | +| QUARTILE | Returns the quartile of a data set, based on inclusive percentile values. | QUARTILE(Data, Quart) | +| QUARTILE.EXC | Returns the quartile of a data set, based on exclusive percentile values. | QUARTILE.EXC(Data, Quart) | +| QUARTILE.INC | Returns the quartile of a data set, based on inclusive percentile values. | QUARTILE.INC(Data, Quart) | +| RSQ | Returns the squared correlation coefficient between two data sets. | RSQ(Data1, Data2) | +| SKEW | Returns skeweness of a sample. | SKEW(Number1, ...) | +| SKEW.P | Returns skeweness of a population. | SKEW.P(Number1, ...) | +| SKEWP | Returns skeweness of a population. | SKEWP(Number1, ...) | +| SLOPE | Returns the slope of a linear regression line. | SLOPE(Array1, Array2) | +| SMALL | Returns k-th smallest value in a range. | SMALL(Range, K) | +| STANDARDIZE | Returns normalized value wrt expected value and standard deviation. | STANDARDIZE(X, Mean, Stddev) | +| STDEV | Returns standard deviation of a sample. | STDEV(Value1, ...) | +| STDEV.P | Returns standard deviation of a population. | STDEV.P(Value1, ...) | +| STDEV.S | Returns standard deviation of a sample. | STDEV.S(Value1, ...) | +| STDEVA | Returns standard deviation of a sample. | STDEVA(Value1, ...) | +| STDEVP | Returns standard deviation of a population. | STDEVP(Value1, ...) | +| STDEVPA | Returns standard deviation of a population. | STDEVPA(Value1, ...) | +| STDEVS | Returns standard deviation of a sample. | STDEVS(Value1, ...) | +| STEYX | Returns standard error for predicted of the predicted y value for each x value. | STEYX(Array1, Array2) | +| T.DIST | Returns density of Student-t distribution. | T.DIST(X, Degrees, Mode) | +| T.DIST.2T | Returns density of Student-t distribution, both-sided. | T.DIST.2T(X, Degrees) | +| T.DIST.RT | Returns density of Student-t distribution, right-tailed. | T.DIST.RT(X, Degrees) | +| T.INV | Returns inverse Student-t distribution. | T.INV(P, Degrees) | +| T.INV.2T | Returns inverse Student-t distribution, both-sided. | T.INV.2T(P, Degrees) | +| T.TEST | Returns t-test value for a dataset. | T.TEST(Array1, Array2, Tails, Type) | +| TDIST | Returns density of Student-t distribution, both-sided or right-tailed. | TDIST(X, Degrees, Mode) | +| TDIST2T | Returns density of Student-t distribution, both-sided. | TDIST2T(X, Degrees) | +| TDISTRT | Returns density of Student-t distribution, right-tailed. | TDISTRT(X, Degrees) | +| TINV | Returns inverse Student-t distribution, both-sided. | TINV(P, Degrees) | +| TINV2T | Returns inverse Student-t distribution, both-sided. | TINV2T(P, Degrees) | +| TTEST | Returns t-test value for a dataset. | TTEST(Array1, Array2, Tails, Type) | +| VAR | Returns variance of a sample. | VAR(Value1, ...) | +| VAR.P | Returns variance of a population. | VAR.P(Value1, ...) | +| VAR.S | Returns variance of a sample. | VAR.S(Value1, ...) | +| VARA | Returns variance of a sample. | VARA(Value1, ...) | +| VARP | Returns variance of a population. | VARP(Value1, ...) | +| VARPA | Returns variance of a population. | VARPA(Value1, ...) | +| VARS | Returns variance of a sample. | VARS(Value1, ...) | +| WEIBULL | Returns density of Weibull distribution. | WEIBULL(Number1, Number2, Number3, Boolean) | +| WEIBULL.DIST | Returns density of Weibull distribution. | WEIBULL.DIST(Number1, Number2, Number3, Boolean) | +| WEIBULLDIST | Returns density of Weibull distribution. | WEIBULLDIST(Number1, Number2, Number3, Boolean) | +| Z.TEST | Returns z-test value for a dataset. | Z.TEST(Array, X, [Sigma]) | +| ZTEST | Returns z-test value for a dataset. | ZTEST(Array, X, [Sigma]) | ### Text -| Function ID | Description | Syntax | -|:------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------| -| CHAR | Converts a number into a character according to the current code table. | CHAR(Number) | -| CLEAN | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | -| CODE | Returns a numeric code for the first character in a text string. | CODE("Text") | -| CONCATENATE | Combines several text strings into one string. | CONCATENATE("Text1", "Text2", ..."TextN") | -| EXACT | Returns TRUE if both text strings are exactly the same. | EXACT(Text, Text) | -| FIND | Returns the location of one text string inside another. | FIND( "Text1", "Text2"[, Number]) | -| LEFT | Extracts a given number of characters from the left side of a text string. | LEFT("Text", Number) | -| LEN | Returns length of a given text. | LEN("Text") | -| LOWER | Returns text converted to lowercase. | LOWER(Text) | -| MID | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | -| N | Converts a value to a number. | N(Value) | -| PROPER | Capitalizes words given text string. | PROPER("Text") | -| REPLACE | Replaces substring of a text of a given length that starts at given position. | REPLACE(Text, Start_position, Length, New_text) | -| REPT | Repeats text a given number of times. | REPT("Text", Number) | -| RIGHT | Extracts a given number of characters from the right side of a text string. | RIGHT("Text", Number) | -| SEARCH | Returns the location of Search_string inside Text. Case-insensitive. Allows the use of wildcards. | SEARCH(Search_string, Text[, Start_position]) | -| SPLIT | Divides the provided text using the space character as a separator and returns the substring at the zero-based position specified by the second argument.
`SPLIT("Lorem ipsum", 0) -> "Lorem"`
`SPLIT("Lorem ipsum", 1) -> "ipsum"` | SPLIT(Text, Index) | -| SUBSTITUTE | Returns string where occurrences of Old_text are replaced by New_text. Replaces only specific occurrence if last parameter is provided. | SUBSTITUTE(Text, Old_text, New_text, [Occurrence]) | -| T | Returns text if given value is text, empty string otherwise. | T(Value) | -| TEXT | Converts a number into text according to a given format.
By default, accepts the same formats that can be passed to the [`dateFormats`](../api/interfaces/configparams.md#dateformats) option, but can be further customized with the [`stringifyDateTime`](../api/interfaces/configparams.md#stringifydatetime) option. | TEXT(Number, Format) | -| TEXTJOIN | Joins text from multiple strings and/or ranges with a delimiter. Supports array/range delimiters that cycle through gaps. When ignore_empty is TRUE, empty strings are skipped. Returns #VALUE! if result exceeds 32,767 characters. | TEXTJOIN(Delimiter, Ignore_empty, Text1, [Text2, ...]) | -| TRIM | Strips extra spaces from text. | TRIM("Text") | -| UNICHAR | Returns the character created by using provided code point. | UNICHAR(Number) | -| UNICODE | Returns the Unicode code point of a first character of a text. | UNICODE(Text) | -| UPPER | Returns text converted to uppercase. | UPPER(Text) | -| VALUE | Parses a number, date, time, datetime, currency, or percentage from a text string. | VALUE(Text) | +| Function ID | Description | Syntax | +|:---|:---|:---| +| CHAR | Converts a number into a character according to the current code table. | CHAR(Number) | +| CLEAN | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN(Text) | +| CODE | Returns a numeric code for the first character in a text string. | CODE(Text) | +| CONCATENATE | Combines several text strings into one string. | CONCATENATE(Text1, ...) | +| EXACT | Returns TRUE if both text strings are exactly the same. | EXACT(Text1, Text2) | +| FIND | Returns the location of one text string inside another. | FIND(Text1, Text2, [Number]) | +| LEFT | Extracts a given number of characters from the left side of a text string. | LEFT(Text, [Number]) | +| LEN | Returns length of a given text. | LEN(Text) | +| LOWER | Returns text converted to lowercase. | LOWER(Text) | +| MID | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | +| N | Converts a value to a number. | N(Value) | +| PROPER | Capitalizes words given text string. | PROPER(Text) | +| REPLACE | Replaces substring of a text of a given length that starts at given position. | REPLACE(Text, Start_position, Length, New_text) | +| REPT | Repeats text a given number of times. | REPT(Text, Number) | +| RIGHT | Extracts a given number of characters from the right side of a text string. | RIGHT(Text, [Number]) | +| SEARCH | Returns the location of Search_string inside Text. Case-insensitive. Allows the use of wildcards. | SEARCH(Search_string, Text, [Start_position]) | +| SPLIT | Divides the provided text using the space character as a separator and returns the substring at the zero-based position specified by the second argument.
`SPLIT("Lorem ipsum", 0) -> "Lorem"`
`SPLIT("Lorem ipsum", 1) -> "ipsum"` | SPLIT(Text, Index) | +| SUBSTITUTE | Returns string where occurrences of Old_text are replaced by New_text. Replaces only specific occurrence if last parameter is provided. | SUBSTITUTE(Text, Old_text, New_text, [Occurrence]) | +| T | Returns text if given value is text, empty string otherwise. | T(Value) | +| TEXT | Converts a number into text according to a given format.
By default, accepts the same formats that can be passed to the [`dateFormats`](../api/interfaces/configparams.md#dateformats) option, but can be further customized with the [`stringifyDateTime`](../api/interfaces/configparams.md#stringifydatetime) option. | TEXT(Number, Format) | +| TEXTJOIN | Joins text from multiple strings and/or ranges with a delimiter. Supports array/range delimiters that cycle through gaps. When ignore_empty is TRUE, empty strings are skipped. Returns #VALUE! if result exceeds 32,767 characters. | TEXTJOIN(Delimiter, Ignore_empty, Text1, ...) | +| TRIM | Strips extra spaces from text. | TRIM(Text) | +| UNICHAR | Returns the character created by using provided code point. | UNICHAR(Number) | +| UNICODE | Returns the Unicode code point of a first character of a text. | UNICODE(Text) | +| UPPER | Returns text converted to uppercase. | UPPER(Text) | +| VALUE | Parses a number, date, time, datetime, currency, or percentage from a text string. | VALUE(Text) | diff --git a/package.json b/package.json index e2c8d29d1..e98325599 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "docs:code-examples:generate-js": "bash docs/code-examples-generator.sh", "docs:code-examples:generate-all-js": "bash docs/code-examples-generator.sh --generateAll", "docs:code-examples:format-all-ts": "bash docs/code-examples-generator.sh --formatAllTsExamples", + "docs:generate-functions": "npm run tsnode scripts/generate-builtin-functions-doc.ts", "bundle-all": "cross-env HF_COMPILE=1 npm-run-all clean compile bundle:** verify-bundles", "bundle:es": "(node script/if-ne-env.js HF_COMPILE=1 || npm run compile) && cross-env-shell BABEL_ENV=es env-cmd -f ht.config.js babel lib --out-file-extension .mjs --out-dir es", "bundle:cjs": "(node script/if-ne-env.js HF_COMPILE=1 || npm run compile) && cross-env-shell BABEL_ENV=commonjs env-cmd -f ht.config.js babel lib --out-dir commonjs", diff --git a/scripts/generate-builtin-functions-doc.ts b/scripts/generate-builtin-functions-doc.ts new file mode 100644 index 000000000..03b91ccbe --- /dev/null +++ b/scripts/generate-builtin-functions-doc.ts @@ -0,0 +1,48 @@ +/** + * @license + * Copyright (c) 2025 Handsoncode. All rights reserved. + */ + +/** + * HF-249 bullet 3 — generates the built-in functions table in `docs/guide/built-in-functions.md` from + * HyperFormula's public API (single source of truth). Dev-only; never shipped (`tsconfig.json` `include` is + * `["src"]`). Run: `npm run tsnode scripts/generate-builtin-functions-doc.ts` (writes the file) or + * `... --check` (CI: regenerate in memory, fail on drift / membership mismatch, write nothing). + */ + +import * as fs from 'fs' +import * as path from 'path' +import {HyperFormula} from '../src' +import {renderBuiltinFunctionsTable, spliceFunctionsTable} from '../src/interpreter/functionMetadata/renderBuiltinFunctionsTable' + +const REPO_ROOT = path.resolve(__dirname, '..') +const DOC_PATH = path.join(REPO_ROOT, 'docs/guide/built-in-functions.md') +const LANGUAGE = 'enGB' + +/** Reads the doc file and returns a new version with the generated table region spliced in. */ +function buildUpdatedFile(): string { + const entries = HyperFormula.getAvailableFunctions(LANGUAGE) + const detailsFor = (canonicalName: string) => HyperFormula.getFunctionDetails(canonicalName, LANGUAGE) + const generated = renderBuiltinFunctionsTable(entries, detailsFor) + const current = fs.readFileSync(DOC_PATH, 'utf8') + return spliceFunctionsTable(current, generated) +} + +/** Writes the regenerated file (default) or exits non-zero if the file is out of date (`--check`). */ +function main(): void { + const check = process.argv.includes('--check') + const updated = buildUpdatedFile() + const current = fs.readFileSync(DOC_PATH, 'utf8') + if (check) { + if (updated !== current) { + process.stderr.write('built-in-functions.md is out of date. Run `npm run docs:generate-functions`.\n') + process.exit(1) + } + process.stdout.write('built-in-functions.md is up to date.\n') + return + } + fs.writeFileSync(DOC_PATH, updated, 'utf8') + process.stdout.write('built-in-functions.md regenerated.\n') +} + +main() From bf816133eaf310dc92995b47a42631259035f0b9 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 00:42:00 +0000 Subject: [PATCH 07/15] feat(metadata): surface OFFSET and VERSION via the function-metadata API (HF-249) getAvailableFunctions/getFunctionDetails excluded the protected functions OFFSET and VERSION because they have no plugin for resolveFunctionMetadata to read arity from. A user can still call both from a formula, so they must be documented too: getListableFunctionIds (static and instance) now include the protected ids, and resolveFunctionMetadata resolves them from a new authored PROTECTED_FUNCTION_METADATA map together with their catalogue FunctionDoc entries in the lookup-and-reference and information categories. --- src/HyperFormula.ts | 9 +++++ src/interpreter/FunctionRegistry.ts | 23 ++++++++--- .../categories/information.ts | 8 ++++ .../categories/lookup-and-reference.ts | 8 ++++ .../protectedFunctionMetadata.ts | 40 +++++++++++++++++++ 5 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 src/interpreter/functionMetadata/protectedFunctionMetadata.ts diff --git a/src/HyperFormula.ts b/src/HyperFormula.ts index 8142b098c..1a6d05d9f 100644 --- a/src/HyperFormula.ts +++ b/src/HyperFormula.ts @@ -48,6 +48,7 @@ import {FunctionPluginDefinition} from './interpreter' import {FUNCTION_DOCS} from './interpreter/functionMetadata' import {buildCustomFunctionDetails, buildCustomFunctionListEntry, buildFunctionDetails, buildFunctionListEntry, StructuralMetadata} from './interpreter/functionMetadata/buildFunctionDescriptions' import {FunctionDetails, FunctionDoc, FunctionListEntry} from './interpreter/functionMetadata/FunctionDescription' +import {PROTECTED_FUNCTION_METADATA} from './interpreter/functionMetadata/protectedFunctionMetadata' import {FunctionRegistry, FunctionTranslationsPackage} from './interpreter/FunctionRegistry' import {FormatInfo} from './interpreter/InterpreterValue' import {LazilyTransformingAstService} from './LazilyTransformingAstService' @@ -727,6 +728,14 @@ export class HyperFormula implements TypedEmitter { * @param {FunctionPluginDefinition | undefined} plugin - the plugin registered for `functionId`, or `undefined` */ private static resolveFunctionMetadata(functionId: string, plugin: FunctionPluginDefinition | undefined): { doc: FunctionDoc | undefined, metadata: StructuralMetadata } | undefined { + // Protected ids (VERSION, OFFSET) are excluded from the plugin registry by design (`getFunctionPlugin` always + // returns `undefined` for them), so they would otherwise fall straight into the `plugin === undefined` case + // below and disappear from the metadata API. Kuba decided (HF-249) that they must still be described, because + // a user can call them from a formula: resolve them here from the authored catalogue doc and structural + // metadata instead of from a plugin. Functions without a catalogue entry stay unlisted. + if (FunctionRegistry.functionIsProtected(functionId) && FUNCTION_DOCS[functionId] !== undefined) { + return {doc: FUNCTION_DOCS[functionId], metadata: PROTECTED_FUNCTION_METADATA[functionId]} + } if (plugin === undefined) { return undefined } diff --git a/src/interpreter/FunctionRegistry.ts b/src/interpreter/FunctionRegistry.ts index e9c6bc9f6..225f4785f 100644 --- a/src/interpreter/FunctionRegistry.ts +++ b/src/interpreter/FunctionRegistry.ts @@ -162,11 +162,15 @@ export class FunctionRegistry { } /** - * Returns the ids of all registered, non-protected functions, including aliases. Used by the function-metadata - * API to list every function reachable in a formula (built-in canonical ids plus their aliases). + * Returns the ids of all functions the function-metadata API (`getAvailableFunctions`/`getFunctionDetails`) + * should describe: every registered non-protected function (built-in canonical ids plus their aliases), plus + * the protected ids (e.g. `VERSION`, `OFFSET`). Protected ids are excluded from registration (`this.plugins`) + * so they can never be unregistered or shadowed, but a user can still call them from a formula, so the metadata + * API surfaces them too (HF-249). Safe to include here: this method is consumed only by the metadata API, never + * by anything that would let a caller register/unregister against a protected id. */ public static getListableFunctionIds(): string[] { - return Array.from(this.plugins.keys()) + return [...this.plugins.keys(), ...this._protectedPlugins.keys()] } public static getFunctionPlugin(functionId: string): Maybe { @@ -283,11 +287,18 @@ export class FunctionRegistry { } /** - * Returns the ids of all functions registered in this instance, including aliases and any custom (user-registered) - * functions, excluding protected ids. Used by the instance-level function-metadata API. + * Returns the ids of all functions the instance-level function-metadata API should describe: every function + * registered in this instance (aliases and any custom/user-registered functions included), plus the protected + * ids (e.g. `VERSION`, `OFFSET`). `instancePlugins` already contains `VERSION` (the constructor loads any + * protected id that has a plugin, unprotected, so it can be executed), but not `OFFSET` (it has no plugin at + * all — it is transformed at parse time). Appending `FunctionRegistry._protectedPlugins`'s keys explicitly, the + * same way the static {@link FunctionRegistry.getListableFunctionIds} does, covers both uniformly instead of + * relying on the constructor's incidental loading; de-duplicated via `Set` because `VERSION` would otherwise be + * listed twice (once from `instancePlugins`, once from `_protectedPlugins`). A user can see these ids via + * `getAvailableFunctions`/`getFunctionDetails` even though they can never be unregistered (HF-249). */ public getListableFunctionIds(): string[] { - return Array.from(this.instancePlugins.keys()).filter(id => !FunctionRegistry.functionIsProtected(id)) + return Array.from(new Set([...this.instancePlugins.keys(), ...FunctionRegistry._protectedPlugins.keys()])) } public getFunction(functionId: string): Maybe { diff --git a/src/interpreter/functionMetadata/categories/information.ts b/src/interpreter/functionMetadata/categories/information.ts index ab12675e7..27457240e 100644 --- a/src/interpreter/functionMetadata/categories/information.ts +++ b/src/interpreter/functionMetadata/categories/information.ts @@ -90,4 +90,12 @@ export const INFORMATION_DOCS: Record = { shortDescription: 'Returns number of sheet of a given reference or number of all sheets in workbook when no argument is provided.', parameters: [{name: 'Value', description: ''}], }, + // VERSION is a protected function (its plugin, VersionPlugin, is kept out of the general registry so it can + // never be unregistered; see `FunctionRegistry._protectedPlugins`). Its structural metadata (parameters, + // repeatLastArgs) is authored separately in `PROTECTED_FUNCTION_METADATA`. + VERSION: { + category: 'Information', + shortDescription: 'Returns the version number of HyperFormula.', + parameters: [], + }, } diff --git a/src/interpreter/functionMetadata/categories/lookup-and-reference.ts b/src/interpreter/functionMetadata/categories/lookup-and-reference.ts index a1b491563..a7fdece78 100644 --- a/src/interpreter/functionMetadata/categories/lookup-and-reference.ts +++ b/src/interpreter/functionMetadata/categories/lookup-and-reference.ts @@ -55,6 +55,14 @@ export const LOOKUP_AND_REFERENCE_DOCS: Record = { shortDescription: 'Returns the relative position of an item in an array that matches a specified value.', parameters: [{name: 'Searchcriterion', description: ''}, {name: 'LookupArray', description: ''}, {name: 'MatchType', description: ''}], }, + // OFFSET is a protected function (parse-time transformed into a cell/range reference, so it has no plugin or + // implementation metadata; see `FunctionRegistry._protectedPlugins`). Its structural metadata (parameter + // optionality, repeatLastArgs) is authored separately in `PROTECTED_FUNCTION_METADATA`. + OFFSET: { + category: 'Lookup and reference', + shortDescription: 'Returns the value of a cell offset by a certain number of rows and columns from a given reference point.', + parameters: [{name: 'Reference', description: ''}, {name: 'Rows', description: ''}, {name: 'Columns', description: ''}, {name: 'Height', description: ''}, {name: 'Width', description: ''}], + }, ROW: { category: 'Lookup and reference', shortDescription: 'Returns row number of a given reference or formula reference if argument not provided.', diff --git a/src/interpreter/functionMetadata/protectedFunctionMetadata.ts b/src/interpreter/functionMetadata/protectedFunctionMetadata.ts new file mode 100644 index 000000000..a5cd77f34 --- /dev/null +++ b/src/interpreter/functionMetadata/protectedFunctionMetadata.ts @@ -0,0 +1,40 @@ +/** + * @license + * Copyright (c) 2025 Handsoncode. All rights reserved. + */ + +import {FunctionArgumentType} from '../plugin/FunctionPlugin' +import {StructuralMetadata} from './buildFunctionDescriptions' + +/** + * Authored structural metadata (parameter optionality, `repeatLastArgs`) for the protected built-in functions + * (`FunctionRegistry._protectedPlugins`), keyed by canonical id. + * + * Protected ids are not registered as ordinary plugins, so they carry no `implementedFunctions` entry for + * {@link HyperFormula.resolveFunctionMetadata} to read arity/optionality from: + * - `OFFSET` is transformed at parse time into a cell/range reference and has no plugin at all. + * - `VERSION` has a plugin (`VersionPlugin`), but it is deliberately excluded from the general registry so it can + * never be unregistered; reusing its `implementedFunctions` entry would require importing the protected plugin + * into the metadata builders, which this module avoids. + * + * Each entry's `parameters.length` MUST equal the corresponding `FunctionDoc.parameters.length` in `FUNCTION_DOCS`. + * Unlike plugin-backed functions, `HyperFormula.resolveFunctionMetadata`'s arity cross-check does not run for + * protected ids (they return early, before that check), so this invariant is not enforced at runtime — it must be + * kept true by hand when editing either map, otherwise `buildFunctionDetails` throws for the mismatched id. + */ +export const PROTECTED_FUNCTION_METADATA: Record = { + OFFSET: { + parameters: [ + {argumentType: FunctionArgumentType.ANY}, + {argumentType: FunctionArgumentType.NUMBER}, + {argumentType: FunctionArgumentType.NUMBER}, + {argumentType: FunctionArgumentType.NUMBER, optionalArg: true}, + {argumentType: FunctionArgumentType.NUMBER, optionalArg: true}, + ], + repeatLastArgs: 0, + }, + VERSION: { + parameters: [], + repeatLastArgs: 0, + }, +} From 6ca49cf247523ed87ac493d8157718f680e371e3 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 01:11:00 +0000 Subject: [PATCH 08/15] docs(guide): regenerate built-in functions table to include OFFSET and VERSION (HF-249) --- docs/guide/built-in-functions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/guide/built-in-functions.md b/docs/guide/built-in-functions.md index 3ce56891d..373fb5ea8 100644 --- a/docs/guide/built-in-functions.md +++ b/docs/guide/built-in-functions.md @@ -188,6 +188,7 @@ Total number of functions: **{{ $page.functionsCount }}** | NA | Returns #N/A! error value. | NA() | | SHEET | Returns sheet number of a given value or a formula sheet number if no argument is provided. | SHEET(Value) | | SHEETS | Returns number of sheet of a given reference or number of all sheets in workbook when no argument is provided. | SHEETS(Value) | +| VERSION | Returns the version number of HyperFormula. | VERSION() | ### Financial @@ -251,6 +252,7 @@ Total number of functions: **{{ $page.functionsCount }}** | HYPERLINK | Stores the url in the cell's metadata. It can be read using method [`getCellHyperlink`](../api/classes/hyperformula.md#getcellhyperlink) | HYPERLINK(Url, [LinkLabel]) | | INDEX | Returns the contents of a cell specified by row and column number. The column number is optional and defaults to 1. | INDEX(Range, Row, [Column]) | | MATCH | Returns the relative position of an item in an array that matches a specified value. | MATCH(Searchcriterion, LookupArray, [MatchType]) | +| OFFSET | Returns the value of a cell offset by a certain number of rows and columns from a given reference point. | OFFSET(Reference, Rows, Columns, [Height], [Width]) | | ROW | Returns row number of a given reference or formula reference if argument not provided. | ROW([Reference]) | | ROWS | Returns the number of rows in the given reference. | ROWS(Array) | | VLOOKUP | Searches vertically with reference to adjacent cells to the right. | VLOOKUP(Search_Criterion, Array, Index, [Sort_Order]) | From 1a04bc9ab220315378124c59a163f6ca773809db Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 01:18:25 +0000 Subject: [PATCH 09/15] feat(docs): fail the drift check when the function set changes (HF-249) --- scripts/generate-builtin-functions-doc.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/generate-builtin-functions-doc.ts b/scripts/generate-builtin-functions-doc.ts index 03b91ccbe..6bdeb1576 100644 --- a/scripts/generate-builtin-functions-doc.ts +++ b/scripts/generate-builtin-functions-doc.ts @@ -34,6 +34,18 @@ function main(): void { const updated = buildUpdatedFile() const current = fs.readFileSync(DOC_PATH, 'utf8') if (check) { + // Function IDs live in the per-function anchors (``), §3.1.4. + const idsIn = (text: string) => new Set( + [...text.matchAll(/<\/a>/g)].map(match => match[1]) + ) + const generatedIds = idsIn(updated) + const currentIds = idsIn(current) + const dropped = [...currentIds].filter(id => !generatedIds.has(id)) + const added = [...generatedIds].filter(id => !currentIds.has(id)) + if (dropped.length > 0 || added.length > 0) { + process.stderr.write(`Function set changed. dropped=[${dropped}] added=[${added}]\n`) + process.exit(1) + } if (updated !== current) { process.stderr.write('built-in-functions.md is out of date. Run `npm run docs:generate-functions`.\n') process.exit(1) From 37ab896b2b7f89be85647c111ac2af3a40b10f45 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 01:25:54 +0000 Subject: [PATCH 10/15] style(docs): join id arrays in drift-check message to satisfy lint (HF-249) --- scripts/generate-builtin-functions-doc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate-builtin-functions-doc.ts b/scripts/generate-builtin-functions-doc.ts index 6bdeb1576..166691ee3 100644 --- a/scripts/generate-builtin-functions-doc.ts +++ b/scripts/generate-builtin-functions-doc.ts @@ -43,7 +43,7 @@ function main(): void { const dropped = [...currentIds].filter(id => !generatedIds.has(id)) const added = [...generatedIds].filter(id => !currentIds.has(id)) if (dropped.length > 0 || added.length > 0) { - process.stderr.write(`Function set changed. dropped=[${dropped}] added=[${added}]\n`) + process.stderr.write(`Function set changed. dropped=[${dropped.join(', ')}] added=[${added.join(', ')}]\n`) process.exit(1) } if (updated !== current) { From 9b84536276f7365534403b758af893eac5a2234f Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 01:31:11 +0000 Subject: [PATCH 11/15] build(docs): add docs:generate-functions and drift-check scripts (HF-249) --- CHANGELOG.md | 1 + DEV_DOCS.md | 5 +++++ package.json | 1 + 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e588716e4..d67d51f96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - Added the `getAvailableFunctions()` and `getFunctionDetails()` methods (both static and instance) for retrieving function metadata. [#1692](https://github.com/handsontable/hyperformula/pull/1692) +- The built-in functions guide table is now generated from the function metadata API (single source of truth), and now also documents OFFSET and VERSION. [#1692](https://github.com/handsontable/hyperformula/pull/1692) - Added an Indonesian (Bahasa Indonesia) language pack. [#1674](https://github.com/handsontable/hyperformula/pull/1674) ## [3.3.0] - 2026-05-20 diff --git a/DEV_DOCS.md b/DEV_DOCS.md index 24461cf36..90bacb3ec 100644 --- a/DEV_DOCS.md +++ b/DEV_DOCS.md @@ -69,6 +69,11 @@ Adding a built-in function is similar to adding a [custom function](docs/guide/c 4. Add translations to all language files in `src/i18n/languages/`. 5. Add tests in `test/unit/interpreter/`. +The built-in functions table in `docs/guide/built-in-functions.md` is generated from HyperFormula's API +(`getAvailableFunctions`/`getFunctionDetails`). Do not hand-edit the region between the +`AUTOGENERATED:FUNCTIONS` markers — change the metadata in `src/interpreter/functionMetadata/` and run +`npm run docs:generate-functions`. CI runs `npm run docs:functions:check` to block a stale table. + ## Code style - Prefer a functional approach where possible (`filter`, `map`, `reduce`). diff --git a/package.json b/package.json index e98325599..4b7a7f015 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "docs:code-examples:generate-all-js": "bash docs/code-examples-generator.sh --generateAll", "docs:code-examples:format-all-ts": "bash docs/code-examples-generator.sh --formatAllTsExamples", "docs:generate-functions": "npm run tsnode scripts/generate-builtin-functions-doc.ts", + "docs:functions:check": "npm run tsnode scripts/generate-builtin-functions-doc.ts -- --check", "bundle-all": "cross-env HF_COMPILE=1 npm-run-all clean compile bundle:** verify-bundles", "bundle:es": "(node script/if-ne-env.js HF_COMPILE=1 || npm run compile) && cross-env-shell BABEL_ENV=es env-cmd -f ht.config.js babel lib --out-file-extension .mjs --out-dir es", "bundle:cjs": "(node script/if-ne-env.js HF_COMPILE=1 || npm run compile) && cross-env-shell BABEL_ENV=commonjs env-cmd -f ht.config.js babel lib --out-dir commonjs", From d0918d35c46b625d59ad1d274352ac3abba0cd17 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 01:32:44 +0000 Subject: [PATCH 12/15] docs(dev): avoid asserting CI wiring not yet added (HF-249) --- DEV_DOCS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEV_DOCS.md b/DEV_DOCS.md index 90bacb3ec..3d6ecd339 100644 --- a/DEV_DOCS.md +++ b/DEV_DOCS.md @@ -72,7 +72,7 @@ Adding a built-in function is similar to adding a [custom function](docs/guide/c The built-in functions table in `docs/guide/built-in-functions.md` is generated from HyperFormula's API (`getAvailableFunctions`/`getFunctionDetails`). Do not hand-edit the region between the `AUTOGENERATED:FUNCTIONS` markers — change the metadata in `src/interpreter/functionMetadata/` and run -`npm run docs:generate-functions`. CI runs `npm run docs:functions:check` to block a stale table. +`npm run docs:generate-functions`. Run `npm run docs:functions:check` in CI to block a stale table. ## Code style From de80dbd44606653141aadbc397a23895c743cb40 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 01:47:15 +0000 Subject: [PATCH 13/15] ci(docs): fail build-docs if the functions table is stale (HF-249) --- .github/workflows/build-docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 60c43dfc3..0b59bb6fe 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -33,5 +33,8 @@ jobs: - name: Install dependencies run: npm ci + - name: Check built-in functions table is up to date + run: npm run docs:functions:check + - name: Build docs run: npm run docs:build From cb2ad0d3076739dbb38e60aebf98304917b7a4a0 Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 02:21:47 +0000 Subject: [PATCH 14/15] fix(metadata): break renderer ties by canonicalName, soften stale provenance comments (HF-249) Mirror buildAvailableFunctions' canonicalName tiebreaker in the built-in functions table renderer so equal localizedNames sort deterministically regardless of input order. Also soften the information/lookup-and-reference category file comments, which claimed full ownership by scripts/hf249-migrate-function-docs.ts even though they now carry hand-authored protected-function entries (VERSION, OFFSET). --- .../functionMetadata/categories/information.ts | 5 +++-- .../functionMetadata/categories/lookup-and-reference.ts | 5 +++-- .../functionMetadata/renderBuiltinFunctionsTable.ts | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/interpreter/functionMetadata/categories/information.ts b/src/interpreter/functionMetadata/categories/information.ts index 27457240e..4168f86ac 100644 --- a/src/interpreter/functionMetadata/categories/information.ts +++ b/src/interpreter/functionMetadata/categories/information.ts @@ -6,8 +6,9 @@ import {FunctionDoc} from '../FunctionDescription' /** - * Catalogue entries for the "Information" category. Generated from `docs/guide/built-in-functions.md` by - * `scripts/hf249-migrate-function-docs.ts`; parameter descriptions are authored in a later phase. + * Catalogue entries for the "Information" category. Most entries were migrated from `docs/guide/built-in-functions.md` + * by `scripts/hf249-migrate-function-docs.ts`; some (e.g. the protected `VERSION` function) are hand-authored. + * Parameter descriptions are authored in a later phase. */ export const INFORMATION_DOCS: Record = { ISBINARY: { diff --git a/src/interpreter/functionMetadata/categories/lookup-and-reference.ts b/src/interpreter/functionMetadata/categories/lookup-and-reference.ts index a7fdece78..de15cfcc2 100644 --- a/src/interpreter/functionMetadata/categories/lookup-and-reference.ts +++ b/src/interpreter/functionMetadata/categories/lookup-and-reference.ts @@ -6,8 +6,9 @@ import {FunctionDoc} from '../FunctionDescription' /** - * Catalogue entries for the "Lookup and reference" category. Generated from `docs/guide/built-in-functions.md` by - * `scripts/hf249-migrate-function-docs.ts`; parameter descriptions are authored in a later phase. + * Catalogue entries for the "Lookup and reference" category. Most entries were migrated from + * `docs/guide/built-in-functions.md` by `scripts/hf249-migrate-function-docs.ts`; some (e.g. the protected `OFFSET` + * function) are hand-authored. Parameter descriptions are authored in a later phase. */ export const LOOKUP_AND_REFERENCE_DOCS: Record = { ADDRESS: { diff --git a/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts b/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts index fdefc9ce8..880b03454 100644 --- a/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts +++ b/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts @@ -22,8 +22,10 @@ function escapeCell(text: string): string { /** * Renders the built-in functions table as markdown: one `### Category` section per category (in the canonical * `FUNCTION_CATEGORIES` order), each a 3-column table (Function ID | Description | Syntax). Rows are sorted by a - * pinned collator for deterministic, byte-idempotent output. Reads only the passed entries + details provider, - * so it is independent of how the catalogue is stored (forward-compatible with a per-function file split). + * pinned collator for deterministic, byte-idempotent output, with the canonical name as a stable tiebreaker for + * entries that share a localized name (mirrors `HyperFormula.buildAvailableFunctions`). Reads only the passed + * entries + details provider, so it is independent of how the catalogue is stored (forward-compatible with a + * per-function file split). * * @param {FunctionListEntry[]} entries - the function set to document (e.g. `HyperFormula.getAvailableFunctions`) * @param {(canonicalName: string) => FunctionDetails | undefined} detailsFor - resolves a function's details @@ -50,7 +52,7 @@ export function renderBuiltinFunctionsTable( if (bucket === undefined || bucket.length === 0) { continue } - bucket.sort((a, b) => COLLATOR.compare(a.localizedName, b.localizedName)) + bucket.sort((a, b) => COLLATOR.compare(a.localizedName, b.localizedName) || COLLATOR.compare(a.canonicalName, b.canonicalName)) const rows = bucket.map(entry => { const details = detailsFor(entry.canonicalName) if (details === undefined) { From 4b5ef179b54d4c5495a54f28a4582e4aa21ff92c Mon Sep 17 00:00:00 2001 From: marcin-kordas-hoc Date: Wed, 1 Jul 2026 06:26:18 +0000 Subject: [PATCH 15/15] docs(metadata): drop internal spec ref, note English-only collator (HF-249) --- scripts/generate-builtin-functions-doc.ts | 2 +- .../functionMetadata/renderBuiltinFunctionsTable.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/generate-builtin-functions-doc.ts b/scripts/generate-builtin-functions-doc.ts index 166691ee3..d9991b525 100644 --- a/scripts/generate-builtin-functions-doc.ts +++ b/scripts/generate-builtin-functions-doc.ts @@ -34,7 +34,7 @@ function main(): void { const updated = buildUpdatedFile() const current = fs.readFileSync(DOC_PATH, 'utf8') if (check) { - // Function IDs live in the per-function anchors (``), §3.1.4. + // Function IDs live in the per-function anchors (``). const idsIn = (text: string) => new Set( [...text.matchAll(/<\/a>/g)].map(match => match[1]) ) diff --git a/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts b/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts index 880b03454..7219fda80 100644 --- a/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts +++ b/src/interpreter/functionMetadata/renderBuiltinFunctionsTable.ts @@ -11,7 +11,11 @@ export const FUNCTIONS_TABLE_START = '' /** Closing marker; everything after it (e.g. footnote definitions) is hand-maintained. */ export const FUNCTIONS_TABLE_END = '' -/** Deterministic, environment-independent ordering for function names (never ambient locale). */ +/** + * Deterministic, environment-independent ordering for function names (never ambient locale). Intentionally + * pinned to English: the generated table is English-only, so ordering must not depend on the host locale. (The + * public API's list ordering is language-derived; this renderer's is deliberately English-only.) + */ const COLLATOR = new Intl.Collator('en', {sensitivity: 'variant', caseFirst: 'upper'}) /** Escapes only the table-breaking pipe; all other markdown (links, code, `
`, footnotes) is verbatim. */