@rowsncolumns/functions 15.0.1 → 15.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +21 -3
- package/dist/cjs/descriptions.d.ts +16 -0
- package/dist/cjs/descriptions.d.ts.map +1 -0
- package/dist/cjs/descriptions.js +18 -0
- package/dist/cjs/function-descriptions.d.ts.map +1 -1
- package/dist/cjs/function-descriptions.js +557 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/descriptions.d.ts +16 -0
- package/dist/esm/descriptions.d.ts.map +1 -0
- package/dist/esm/descriptions.js +14 -0
- package/dist/esm/function-descriptions.d.ts.map +1 -1
- package/dist/esm/function-descriptions.js +557 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +14 -6
package/Readme.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @rowsncolumns/functions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The function catalog (`functionDescriptions`: name, syntax, description, parameters, category) that
|
|
4
|
+
drives autocomplete and Insert Function, plus the custom functions (`functions`) the legacy
|
|
5
|
+
JavaScript calculator registers.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
## Entries
|
|
8
|
+
|
|
9
|
+
| Import | Contents |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `@rowsncolumns/functions/descriptions` | `functionDescriptions` only. Pure data, no runtime imports — what a host on `@rowsncolumns/rnc-engine` / `rnc-yrs-store` should use. |
|
|
12
|
+
| `@rowsncolumns/functions` | The catalog **and** `functions`, the custom-function implementations for the JavaScript calculator (pulls in `@rowsncolumns/calculator`, `fast-formula-parser`, `toolkit`). |
|
|
13
|
+
| `@rowsncolumns/functions/server` | The catalog and the server-safe `functions` for the calculation worker. |
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { functionDescriptions } from "@rowsncolumns/functions/descriptions";
|
|
17
|
+
|
|
18
|
+
<CanvasGrid functionDescriptions={functionDescriptions} … />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The package is declared `"sideEffects": false`; `__tests__/descriptions-subpath.spec.ts` holds the
|
|
22
|
+
`descriptions` entry to the catalog alone, and `__tests__/engine-description-coverage.spec.ts` holds
|
|
23
|
+
the catalog to every function the rnc-engine wasm registers.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rowsncolumns/functions/descriptions` — the function catalog on its own.
|
|
3
|
+
*
|
|
4
|
+
* The root entry also re-exports the legacy JavaScript calculator's implementations (`functions`),
|
|
5
|
+
* which pull in `@rowsncolumns/calculator`, `@rowsncolumns/fast-formula-parser` and
|
|
6
|
+
* `@rowsncolumns/toolkit`. A host on the Rust engine only needs the catalog (autocomplete, Insert
|
|
7
|
+
* Function, the conditional-format / data-validation editors), so this entry must stay a pure data
|
|
8
|
+
* module: nothing here may import from `./formulas` or any `@rowsncolumns/*` runtime package.
|
|
9
|
+
* `__tests__/descriptions-subpath.spec.ts` walks the built import graph to hold that (#1135).
|
|
10
|
+
*
|
|
11
|
+
* The specifier carries its `.js` extension so the emitted `dist/esm/descriptions.js` also loads
|
|
12
|
+
* under Node's own ESM resolver (no bundler), not only under bundlers that resolve bare paths.
|
|
13
|
+
*/
|
|
14
|
+
export { functionDescriptions } from "./function-descriptions.js";
|
|
15
|
+
export type { CalculatorFunction, FunctionParameter } from "./types";
|
|
16
|
+
//# sourceMappingURL=descriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["../../descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.functionDescriptions = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `@rowsncolumns/functions/descriptions` — the function catalog on its own.
|
|
6
|
+
*
|
|
7
|
+
* The root entry also re-exports the legacy JavaScript calculator's implementations (`functions`),
|
|
8
|
+
* which pull in `@rowsncolumns/calculator`, `@rowsncolumns/fast-formula-parser` and
|
|
9
|
+
* `@rowsncolumns/toolkit`. A host on the Rust engine only needs the catalog (autocomplete, Insert
|
|
10
|
+
* Function, the conditional-format / data-validation editors), so this entry must stay a pure data
|
|
11
|
+
* module: nothing here may import from `./formulas` or any `@rowsncolumns/*` runtime package.
|
|
12
|
+
* `__tests__/descriptions-subpath.spec.ts` walks the built import graph to hold that (#1135).
|
|
13
|
+
*
|
|
14
|
+
* The specifier carries its `.js` extension so the emitted `dist/esm/descriptions.js` also loads
|
|
15
|
+
* under Node's own ESM resolver (no bundler), not only under bundlers that resolve bare paths.
|
|
16
|
+
*/
|
|
17
|
+
var function_descriptions_js_1 = require("./function-descriptions.js");
|
|
18
|
+
Object.defineProperty(exports, "functionDescriptions", { enumerable: true, get: function () { return function_descriptions_js_1.functionDescriptions; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-descriptions.d.ts","sourceRoot":"","sources":["../../function-descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"function-descriptions.d.ts","sourceRoot":"","sources":["../../function-descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,EAopWpD,CAAC"}
|
|
@@ -9805,4 +9805,561 @@ exports.functionDescriptions = [
|
|
|
9805
9805
|
},
|
|
9806
9806
|
],
|
|
9807
9807
|
},
|
|
9808
|
+
{
|
|
9809
|
+
datatype: "Logical",
|
|
9810
|
+
title: "LET",
|
|
9811
|
+
syntax: "LET(name1, value1, [name2, value2], …, calculation)",
|
|
9812
|
+
description: "Assigns names to calculation results so a value is computed once and reused by name inside the final calculation.",
|
|
9813
|
+
example: "LET(x, A1*2, x+x)",
|
|
9814
|
+
usage: [
|
|
9815
|
+
"LET(x, A1*2, x+x)",
|
|
9816
|
+
"LET(total, SUM(A1:A10), count, COUNT(A1:A10), total/count)",
|
|
9817
|
+
],
|
|
9818
|
+
parameters: [
|
|
9819
|
+
{
|
|
9820
|
+
title: "name1",
|
|
9821
|
+
description: "The first name to assign. Must begin with a letter and cannot look like a cell reference.",
|
|
9822
|
+
},
|
|
9823
|
+
{
|
|
9824
|
+
title: "value1",
|
|
9825
|
+
description: "The value assigned to name1.",
|
|
9826
|
+
},
|
|
9827
|
+
{
|
|
9828
|
+
title: "name2, value2, … [OPTIONAL]",
|
|
9829
|
+
description: "Additional name/value pairs; each value can use the names assigned before it.",
|
|
9830
|
+
},
|
|
9831
|
+
{
|
|
9832
|
+
title: "calculation",
|
|
9833
|
+
description: "The expression that uses the assigned names; its result is the result of LET.",
|
|
9834
|
+
},
|
|
9835
|
+
],
|
|
9836
|
+
},
|
|
9837
|
+
{
|
|
9838
|
+
datatype: "Logical",
|
|
9839
|
+
title: "LAMBDA",
|
|
9840
|
+
syntax: "LAMBDA([parameter1, parameter2, …,] calculation)",
|
|
9841
|
+
description: "Creates a reusable custom function from its parameters and a calculation. Call it in place with LAMBDA(…)(arguments), give it a name in the Name Manager, or pass it to MAP, BYROW, REDUCE and the other helper functions.",
|
|
9842
|
+
example: "LAMBDA(x, y, x+y)(1, 2)",
|
|
9843
|
+
usage: ["LAMBDA(x, y, x+y)(1, 2)", "MAP(A1:A5, LAMBDA(v, v*2))"],
|
|
9844
|
+
parameters: [
|
|
9845
|
+
{
|
|
9846
|
+
title: "parameter1, parameter2, … [OPTIONAL]",
|
|
9847
|
+
description: "Names for the values passed when the function is called. Wrap a name in square brackets to make it optional (see ISOMITTED).",
|
|
9848
|
+
},
|
|
9849
|
+
{
|
|
9850
|
+
title: "calculation",
|
|
9851
|
+
description: "The formula evaluated with the parameters; always the last argument and the function's result.",
|
|
9852
|
+
},
|
|
9853
|
+
],
|
|
9854
|
+
},
|
|
9855
|
+
{
|
|
9856
|
+
datatype: "Info",
|
|
9857
|
+
title: "ISOMITTED",
|
|
9858
|
+
syntax: "ISOMITTED(argument)",
|
|
9859
|
+
description: "Returns TRUE when the named LAMBDA parameter was left out of the call, so a custom function can supply a default.",
|
|
9860
|
+
example: "LAMBDA(x, [y], IF(ISOMITTED(y), x, x+y))(5)",
|
|
9861
|
+
usage: [
|
|
9862
|
+
"LAMBDA(x, [y], IF(ISOMITTED(y), x, x+y))(5)",
|
|
9863
|
+
"LAMBDA(x, [y], IF(ISOMITTED(y), x, x+y))(5, 2)",
|
|
9864
|
+
],
|
|
9865
|
+
parameters: [
|
|
9866
|
+
{
|
|
9867
|
+
title: "argument",
|
|
9868
|
+
description: "The LAMBDA parameter to test.",
|
|
9869
|
+
},
|
|
9870
|
+
],
|
|
9871
|
+
},
|
|
9872
|
+
{
|
|
9873
|
+
datatype: "Lookup",
|
|
9874
|
+
title: "XMATCH",
|
|
9875
|
+
syntax: "XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])",
|
|
9876
|
+
description: "Returns the position of a value in a range or array. Exact match by default, with the same match and search modes as XLOOKUP.",
|
|
9877
|
+
example: "XMATCH(E2, B2:B10)",
|
|
9878
|
+
usage: ["XMATCH(E2, B2:B10)", "XMATCH(E2, B2:B10, 1)", 'XMATCH("gr*", B2:B10, 2)'],
|
|
9879
|
+
parameters: [
|
|
9880
|
+
{
|
|
9881
|
+
title: "lookup_value",
|
|
9882
|
+
description: "The value to search for.",
|
|
9883
|
+
},
|
|
9884
|
+
{
|
|
9885
|
+
title: "lookup_array",
|
|
9886
|
+
description: "The range or array to search in.",
|
|
9887
|
+
},
|
|
9888
|
+
{
|
|
9889
|
+
title: "match_mode [OPTIONAL]",
|
|
9890
|
+
description: "0 for exact match (default), -1 for exact or next smaller, 1 for exact or next larger, 2 for wildcard match.",
|
|
9891
|
+
},
|
|
9892
|
+
{
|
|
9893
|
+
title: "search_mode [OPTIONAL]",
|
|
9894
|
+
description: "1 to search first to last (default), -1 last to first, 2 binary search on ascending data, -2 binary search on descending data.",
|
|
9895
|
+
},
|
|
9896
|
+
],
|
|
9897
|
+
},
|
|
9898
|
+
{
|
|
9899
|
+
datatype: "Filter",
|
|
9900
|
+
title: "VSTACK",
|
|
9901
|
+
syntax: "VSTACK(array1, [array2], …)",
|
|
9902
|
+
description: "Appends arrays vertically, one below the other, into a single array; narrower arrays are padded with #N/A.",
|
|
9903
|
+
example: "VSTACK(A1:C3, E1:G2)",
|
|
9904
|
+
usage: ["VSTACK(A1:C3, E1:G2)", "VSTACK({1,2}, {3,4})"],
|
|
9905
|
+
parameters: [
|
|
9906
|
+
{
|
|
9907
|
+
title: "array1",
|
|
9908
|
+
description: "The first range or array to stack.",
|
|
9909
|
+
},
|
|
9910
|
+
{
|
|
9911
|
+
title: "array2, … [OPTIONAL]",
|
|
9912
|
+
description: "Additional ranges or arrays appended below the previous one.",
|
|
9913
|
+
},
|
|
9914
|
+
],
|
|
9915
|
+
},
|
|
9916
|
+
{
|
|
9917
|
+
datatype: "Filter",
|
|
9918
|
+
title: "HSTACK",
|
|
9919
|
+
syntax: "HSTACK(array1, [array2], …)",
|
|
9920
|
+
description: "Appends arrays horizontally, side by side, into a single array; shorter arrays are padded with #N/A.",
|
|
9921
|
+
example: "HSTACK(A1:A3, C1:C3)",
|
|
9922
|
+
usage: ["HSTACK(A1:A3, C1:C3)", "HSTACK({1;2}, {3;4})"],
|
|
9923
|
+
parameters: [
|
|
9924
|
+
{
|
|
9925
|
+
title: "array1",
|
|
9926
|
+
description: "The first range or array to stack.",
|
|
9927
|
+
},
|
|
9928
|
+
{
|
|
9929
|
+
title: "array2, … [OPTIONAL]",
|
|
9930
|
+
description: "Additional ranges or arrays appended to the right of the previous one.",
|
|
9931
|
+
},
|
|
9932
|
+
],
|
|
9933
|
+
},
|
|
9934
|
+
{
|
|
9935
|
+
datatype: "Filter",
|
|
9936
|
+
title: "CHOOSECOLS",
|
|
9937
|
+
syntax: "CHOOSECOLS(array, col_num1, [col_num2], …)",
|
|
9938
|
+
description: "Returns the specified columns of an array, in the order given; negative numbers count from the last column.",
|
|
9939
|
+
example: "CHOOSECOLS(A1:E10, 1, 3)",
|
|
9940
|
+
usage: ["CHOOSECOLS(A1:E10, 1, 3)", "CHOOSECOLS(A1:E10, -1)"],
|
|
9941
|
+
parameters: [
|
|
9942
|
+
{
|
|
9943
|
+
title: "array",
|
|
9944
|
+
description: "The range or array to pick columns from.",
|
|
9945
|
+
},
|
|
9946
|
+
{
|
|
9947
|
+
title: "col_num1",
|
|
9948
|
+
description: "The first column to return; negative counts from the end.",
|
|
9949
|
+
},
|
|
9950
|
+
{
|
|
9951
|
+
title: "col_num2, … [OPTIONAL]",
|
|
9952
|
+
description: "Additional columns to return, in output order.",
|
|
9953
|
+
},
|
|
9954
|
+
],
|
|
9955
|
+
},
|
|
9956
|
+
{
|
|
9957
|
+
datatype: "Filter",
|
|
9958
|
+
title: "CHOOSEROWS",
|
|
9959
|
+
syntax: "CHOOSEROWS(array, row_num1, [row_num2], …)",
|
|
9960
|
+
description: "Returns the specified rows of an array, in the order given; negative numbers count from the last row.",
|
|
9961
|
+
example: "CHOOSEROWS(A1:E10, 1, 3)",
|
|
9962
|
+
usage: ["CHOOSEROWS(A1:E10, 1, 3)", "CHOOSEROWS(A1:E10, -1)"],
|
|
9963
|
+
parameters: [
|
|
9964
|
+
{
|
|
9965
|
+
title: "array",
|
|
9966
|
+
description: "The range or array to pick rows from.",
|
|
9967
|
+
},
|
|
9968
|
+
{
|
|
9969
|
+
title: "row_num1",
|
|
9970
|
+
description: "The first row to return; negative counts from the end.",
|
|
9971
|
+
},
|
|
9972
|
+
{
|
|
9973
|
+
title: "row_num2, … [OPTIONAL]",
|
|
9974
|
+
description: "Additional rows to return, in output order.",
|
|
9975
|
+
},
|
|
9976
|
+
],
|
|
9977
|
+
},
|
|
9978
|
+
{
|
|
9979
|
+
datatype: "Filter",
|
|
9980
|
+
title: "TOCOL",
|
|
9981
|
+
syntax: "TOCOL(array, [ignore], [scan_by_column])",
|
|
9982
|
+
description: "Returns an array as a single column, reading it row by row unless scan_by_column is TRUE.",
|
|
9983
|
+
example: "TOCOL(A1:C3)",
|
|
9984
|
+
usage: ["TOCOL(A1:C3)", "TOCOL(A1:C3, 1)", "TOCOL(A1:C3, 0, TRUE)"],
|
|
9985
|
+
parameters: [
|
|
9986
|
+
{
|
|
9987
|
+
title: "array",
|
|
9988
|
+
description: "The range or array to flatten.",
|
|
9989
|
+
},
|
|
9990
|
+
{
|
|
9991
|
+
title: "ignore [OPTIONAL]",
|
|
9992
|
+
description: "0 keeps every value (default), 1 ignores blanks, 2 ignores errors, 3 ignores blanks and errors.",
|
|
9993
|
+
},
|
|
9994
|
+
{
|
|
9995
|
+
title: "scan_by_column [OPTIONAL]",
|
|
9996
|
+
description: "TRUE to read the array column by column. Defaults to FALSE (row by row).",
|
|
9997
|
+
},
|
|
9998
|
+
],
|
|
9999
|
+
},
|
|
10000
|
+
{
|
|
10001
|
+
datatype: "Filter",
|
|
10002
|
+
title: "TOROW",
|
|
10003
|
+
syntax: "TOROW(array, [ignore], [scan_by_column])",
|
|
10004
|
+
description: "Returns an array as a single row, reading it row by row unless scan_by_column is TRUE.",
|
|
10005
|
+
example: "TOROW(A1:C3)",
|
|
10006
|
+
usage: ["TOROW(A1:C3)", "TOROW(A1:C3, 1)", "TOROW(A1:C3, 0, TRUE)"],
|
|
10007
|
+
parameters: [
|
|
10008
|
+
{
|
|
10009
|
+
title: "array",
|
|
10010
|
+
description: "The range or array to flatten.",
|
|
10011
|
+
},
|
|
10012
|
+
{
|
|
10013
|
+
title: "ignore [OPTIONAL]",
|
|
10014
|
+
description: "0 keeps every value (default), 1 ignores blanks, 2 ignores errors, 3 ignores blanks and errors.",
|
|
10015
|
+
},
|
|
10016
|
+
{
|
|
10017
|
+
title: "scan_by_column [OPTIONAL]",
|
|
10018
|
+
description: "TRUE to read the array column by column. Defaults to FALSE (row by row).",
|
|
10019
|
+
},
|
|
10020
|
+
],
|
|
10021
|
+
},
|
|
10022
|
+
{
|
|
10023
|
+
datatype: "Filter",
|
|
10024
|
+
title: "WRAPROWS",
|
|
10025
|
+
syntax: "WRAPROWS(vector, wrap_count, [pad_with])",
|
|
10026
|
+
description: "Wraps a single row or column of values into rows of wrap_count values each; the last row is padded with pad_with (#N/A by default).",
|
|
10027
|
+
example: "WRAPROWS(A1:A10, 3)",
|
|
10028
|
+
usage: ["WRAPROWS(A1:A10, 3)", 'WRAPROWS(A1:A10, 3, "")'],
|
|
10029
|
+
parameters: [
|
|
10030
|
+
{
|
|
10031
|
+
title: "vector",
|
|
10032
|
+
description: "The single row or column to wrap.",
|
|
10033
|
+
},
|
|
10034
|
+
{
|
|
10035
|
+
title: "wrap_count",
|
|
10036
|
+
description: "Maximum number of values per row.",
|
|
10037
|
+
},
|
|
10038
|
+
{
|
|
10039
|
+
title: "pad_with [OPTIONAL]",
|
|
10040
|
+
description: "Value used to fill the last row. Defaults to #N/A.",
|
|
10041
|
+
},
|
|
10042
|
+
],
|
|
10043
|
+
},
|
|
10044
|
+
{
|
|
10045
|
+
datatype: "Filter",
|
|
10046
|
+
title: "WRAPCOLS",
|
|
10047
|
+
syntax: "WRAPCOLS(vector, wrap_count, [pad_with])",
|
|
10048
|
+
description: "Wraps a single row or column of values into columns of wrap_count values each; the last column is padded with pad_with (#N/A by default).",
|
|
10049
|
+
example: "WRAPCOLS(A1:A10, 3)",
|
|
10050
|
+
usage: ["WRAPCOLS(A1:A10, 3)", 'WRAPCOLS(A1:A10, 3, "")'],
|
|
10051
|
+
parameters: [
|
|
10052
|
+
{
|
|
10053
|
+
title: "vector",
|
|
10054
|
+
description: "The single row or column to wrap.",
|
|
10055
|
+
},
|
|
10056
|
+
{
|
|
10057
|
+
title: "wrap_count",
|
|
10058
|
+
description: "Maximum number of values per column.",
|
|
10059
|
+
},
|
|
10060
|
+
{
|
|
10061
|
+
title: "pad_with [OPTIONAL]",
|
|
10062
|
+
description: "Value used to fill the last column. Defaults to #N/A.",
|
|
10063
|
+
},
|
|
10064
|
+
],
|
|
10065
|
+
},
|
|
10066
|
+
{
|
|
10067
|
+
datatype: "Filter",
|
|
10068
|
+
title: "BYROW",
|
|
10069
|
+
syntax: "BYROW(array, lambda(row))",
|
|
10070
|
+
description: "Applies a LAMBDA to each row of an array and returns one result per row, as a column.",
|
|
10071
|
+
example: "BYROW(A1:C5, LAMBDA(row, SUM(row)))",
|
|
10072
|
+
usage: ["BYROW(A1:C5, LAMBDA(row, SUM(row)))", "BYROW(A1:C5, LAMBDA(row, MAX(row)))"],
|
|
10073
|
+
parameters: [
|
|
10074
|
+
{
|
|
10075
|
+
title: "array",
|
|
10076
|
+
description: "The range or array whose rows are processed.",
|
|
10077
|
+
},
|
|
10078
|
+
{
|
|
10079
|
+
title: "lambda(row)",
|
|
10080
|
+
description: "A LAMBDA with one parameter that receives a row and returns a single value.",
|
|
10081
|
+
},
|
|
10082
|
+
],
|
|
10083
|
+
},
|
|
10084
|
+
{
|
|
10085
|
+
datatype: "Filter",
|
|
10086
|
+
title: "BYCOL",
|
|
10087
|
+
syntax: "BYCOL(array, lambda(column))",
|
|
10088
|
+
description: "Applies a LAMBDA to each column of an array and returns one result per column, as a row.",
|
|
10089
|
+
example: "BYCOL(A1:C5, LAMBDA(col, SUM(col)))",
|
|
10090
|
+
usage: ["BYCOL(A1:C5, LAMBDA(col, SUM(col)))", "BYCOL(A1:C5, LAMBDA(col, MAX(col)))"],
|
|
10091
|
+
parameters: [
|
|
10092
|
+
{
|
|
10093
|
+
title: "array",
|
|
10094
|
+
description: "The range or array whose columns are processed.",
|
|
10095
|
+
},
|
|
10096
|
+
{
|
|
10097
|
+
title: "lambda(column)",
|
|
10098
|
+
description: "A LAMBDA with one parameter that receives a column and returns a single value.",
|
|
10099
|
+
},
|
|
10100
|
+
],
|
|
10101
|
+
},
|
|
10102
|
+
{
|
|
10103
|
+
datatype: "Filter",
|
|
10104
|
+
title: "MAP",
|
|
10105
|
+
syntax: "MAP(array1, [array2, …], lambda(value1, [value2, …]))",
|
|
10106
|
+
description: "Applies a LAMBDA to each value of one or more arrays and returns an array of the same shape.",
|
|
10107
|
+
example: "MAP(A1:A5, LAMBDA(v, v*2))",
|
|
10108
|
+
usage: ["MAP(A1:A5, LAMBDA(v, v*2))", "MAP(A1:A5, B1:B5, LAMBDA(a, b, a&b))"],
|
|
10109
|
+
parameters: [
|
|
10110
|
+
{
|
|
10111
|
+
title: "array1",
|
|
10112
|
+
description: "The range or array to map.",
|
|
10113
|
+
},
|
|
10114
|
+
{
|
|
10115
|
+
title: "array2, … [OPTIONAL]",
|
|
10116
|
+
description: "Additional arrays of the same shape, passed to the LAMBDA as further parameters.",
|
|
10117
|
+
},
|
|
10118
|
+
{
|
|
10119
|
+
title: "lambda(value1, [value2, …])",
|
|
10120
|
+
description: "A LAMBDA with one parameter per array that returns the new value.",
|
|
10121
|
+
},
|
|
10122
|
+
],
|
|
10123
|
+
},
|
|
10124
|
+
{
|
|
10125
|
+
datatype: "Filter",
|
|
10126
|
+
title: "REDUCE",
|
|
10127
|
+
syntax: "REDUCE([initial_value], array, lambda(accumulator, value))",
|
|
10128
|
+
description: "Folds an array into a single value by calling a LAMBDA with the running accumulator and each value in turn.",
|
|
10129
|
+
example: "REDUCE(0, A1:A5, LAMBDA(acc, v, acc+v))",
|
|
10130
|
+
usage: ["REDUCE(0, A1:A5, LAMBDA(acc, v, acc+v))", "REDUCE(1, A1:A5, LAMBDA(acc, v, acc*v))"],
|
|
10131
|
+
parameters: [
|
|
10132
|
+
{
|
|
10133
|
+
title: "initial_value [OPTIONAL]",
|
|
10134
|
+
description: "The accumulator's starting value.",
|
|
10135
|
+
},
|
|
10136
|
+
{
|
|
10137
|
+
title: "array",
|
|
10138
|
+
description: "The range or array to fold.",
|
|
10139
|
+
},
|
|
10140
|
+
{
|
|
10141
|
+
title: "lambda(accumulator, value)",
|
|
10142
|
+
description: "A LAMBDA with two parameters that returns the next accumulator.",
|
|
10143
|
+
},
|
|
10144
|
+
],
|
|
10145
|
+
},
|
|
10146
|
+
{
|
|
10147
|
+
datatype: "Filter",
|
|
10148
|
+
title: "SCAN",
|
|
10149
|
+
syntax: "SCAN([initial_value], array, lambda(accumulator, value))",
|
|
10150
|
+
description: "Like REDUCE, but returns every intermediate accumulator as an array of the same shape as the input.",
|
|
10151
|
+
example: "SCAN(0, A1:A5, LAMBDA(acc, v, acc+v))",
|
|
10152
|
+
usage: ["SCAN(0, A1:A5, LAMBDA(acc, v, acc+v))", 'SCAN("", A1:A5, LAMBDA(acc, v, acc&v))'],
|
|
10153
|
+
parameters: [
|
|
10154
|
+
{
|
|
10155
|
+
title: "initial_value [OPTIONAL]",
|
|
10156
|
+
description: "The accumulator's starting value.",
|
|
10157
|
+
},
|
|
10158
|
+
{
|
|
10159
|
+
title: "array",
|
|
10160
|
+
description: "The range or array to scan.",
|
|
10161
|
+
},
|
|
10162
|
+
{
|
|
10163
|
+
title: "lambda(accumulator, value)",
|
|
10164
|
+
description: "A LAMBDA with two parameters that returns the next accumulator.",
|
|
10165
|
+
},
|
|
10166
|
+
],
|
|
10167
|
+
},
|
|
10168
|
+
{
|
|
10169
|
+
datatype: "Filter",
|
|
10170
|
+
title: "MAKEARRAY",
|
|
10171
|
+
syntax: "MAKEARRAY(rows, columns, lambda(row, column))",
|
|
10172
|
+
description: "Builds an array of the given size by calling a LAMBDA with each row and column number.",
|
|
10173
|
+
example: "MAKEARRAY(3, 3, LAMBDA(r, c, r*c))",
|
|
10174
|
+
usage: ["MAKEARRAY(3, 3, LAMBDA(r, c, r*c))", 'MAKEARRAY(2, 2, LAMBDA(r, c, "R"&r&"C"&c))'],
|
|
10175
|
+
parameters: [
|
|
10176
|
+
{
|
|
10177
|
+
title: "rows",
|
|
10178
|
+
description: "Number of rows in the result.",
|
|
10179
|
+
},
|
|
10180
|
+
{
|
|
10181
|
+
title: "columns",
|
|
10182
|
+
description: "Number of columns in the result.",
|
|
10183
|
+
},
|
|
10184
|
+
{
|
|
10185
|
+
title: "lambda(row, column)",
|
|
10186
|
+
description: "A LAMBDA with two parameters that returns the value for that row and column (both 1-based).",
|
|
10187
|
+
},
|
|
10188
|
+
],
|
|
10189
|
+
},
|
|
10190
|
+
{
|
|
10191
|
+
datatype: "Text",
|
|
10192
|
+
title: "TEXTBEFORE",
|
|
10193
|
+
syntax: "TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])",
|
|
10194
|
+
description: "Returns the text that comes before the nth occurrence of a delimiter; a negative instance number counts occurrences from the end.",
|
|
10195
|
+
example: 'TEXTBEFORE("Red riding hood", " ")',
|
|
10196
|
+
usage: [
|
|
10197
|
+
'TEXTBEFORE("Red riding hood", " ")',
|
|
10198
|
+
'TEXTBEFORE("Red riding hood", " ", -1)',
|
|
10199
|
+
'TEXTBEFORE("a-b-c", "-", 2)',
|
|
10200
|
+
],
|
|
10201
|
+
parameters: [
|
|
10202
|
+
{
|
|
10203
|
+
title: "text",
|
|
10204
|
+
description: "The text to search in.",
|
|
10205
|
+
},
|
|
10206
|
+
{
|
|
10207
|
+
title: "delimiter",
|
|
10208
|
+
description: "The text (or array of texts) that marks the point before which to extract.",
|
|
10209
|
+
},
|
|
10210
|
+
{
|
|
10211
|
+
title: "instance_num [OPTIONAL]",
|
|
10212
|
+
description: "Which occurrence of the delimiter to use. Defaults to 1; negative counts from the end.",
|
|
10213
|
+
},
|
|
10214
|
+
{
|
|
10215
|
+
title: "match_mode [OPTIONAL]",
|
|
10216
|
+
description: "0 for case-sensitive (default) or 1 for case-insensitive delimiter matching.",
|
|
10217
|
+
},
|
|
10218
|
+
{
|
|
10219
|
+
title: "match_end [OPTIONAL]",
|
|
10220
|
+
description: "1 treats the end of the text as a delimiter. Defaults to 0.",
|
|
10221
|
+
},
|
|
10222
|
+
{
|
|
10223
|
+
title: "if_not_found [OPTIONAL]",
|
|
10224
|
+
description: "Value returned when the delimiter is not found. Defaults to #N/A.",
|
|
10225
|
+
},
|
|
10226
|
+
],
|
|
10227
|
+
},
|
|
10228
|
+
{
|
|
10229
|
+
datatype: "Text",
|
|
10230
|
+
title: "TEXTAFTER",
|
|
10231
|
+
syntax: "TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])",
|
|
10232
|
+
description: "Returns the text that comes after the nth occurrence of a delimiter; a negative instance number counts occurrences from the end.",
|
|
10233
|
+
example: 'TEXTAFTER("Red riding hood", " ")',
|
|
10234
|
+
usage: [
|
|
10235
|
+
'TEXTAFTER("Red riding hood", " ")',
|
|
10236
|
+
'TEXTAFTER("Red riding hood", " ", -1)',
|
|
10237
|
+
'TEXTAFTER("a-b-c", "-", 2)',
|
|
10238
|
+
],
|
|
10239
|
+
parameters: [
|
|
10240
|
+
{
|
|
10241
|
+
title: "text",
|
|
10242
|
+
description: "The text to search in.",
|
|
10243
|
+
},
|
|
10244
|
+
{
|
|
10245
|
+
title: "delimiter",
|
|
10246
|
+
description: "The text (or array of texts) that marks the point after which to extract.",
|
|
10247
|
+
},
|
|
10248
|
+
{
|
|
10249
|
+
title: "instance_num [OPTIONAL]",
|
|
10250
|
+
description: "Which occurrence of the delimiter to use. Defaults to 1; negative counts from the end.",
|
|
10251
|
+
},
|
|
10252
|
+
{
|
|
10253
|
+
title: "match_mode [OPTIONAL]",
|
|
10254
|
+
description: "0 for case-sensitive (default) or 1 for case-insensitive delimiter matching.",
|
|
10255
|
+
},
|
|
10256
|
+
{
|
|
10257
|
+
title: "match_end [OPTIONAL]",
|
|
10258
|
+
description: "1 treats the start of the text as a delimiter. Defaults to 0.",
|
|
10259
|
+
},
|
|
10260
|
+
{
|
|
10261
|
+
title: "if_not_found [OPTIONAL]",
|
|
10262
|
+
description: "Value returned when the delimiter is not found. Defaults to #N/A.",
|
|
10263
|
+
},
|
|
10264
|
+
],
|
|
10265
|
+
},
|
|
10266
|
+
{
|
|
10267
|
+
datatype: "Filter",
|
|
10268
|
+
title: "GROUPBY",
|
|
10269
|
+
syntax: "GROUPBY(row_fields, values, function, [field_headers], [total_depth], [sort_order], [filter_array], [field_relationship])",
|
|
10270
|
+
description: "Groups the rows of values by the values in row_fields and aggregates each group with the given function, returning a summary table with totals.",
|
|
10271
|
+
example: "GROUPBY(A2:A20, C2:C20, SUM)",
|
|
10272
|
+
usage: ["GROUPBY(A2:A20, C2:C20, SUM)", "GROUPBY(A2:A20, C2:C20, AVERAGE, 0, 0, -2)"],
|
|
10273
|
+
parameters: [
|
|
10274
|
+
{
|
|
10275
|
+
title: "row_fields",
|
|
10276
|
+
description: "Column-oriented range or array containing the values to group by.",
|
|
10277
|
+
},
|
|
10278
|
+
{
|
|
10279
|
+
title: "values",
|
|
10280
|
+
description: "Column-oriented range or array containing the values to aggregate.",
|
|
10281
|
+
},
|
|
10282
|
+
{
|
|
10283
|
+
title: "function",
|
|
10284
|
+
description: "The aggregation to apply to each group: SUM, PERCENTOF, AVERAGE, MEDIAN, COUNT, COUNTA, MAX, MIN, PRODUCT, ARRAYTOTEXT, CONCAT, STDEV.S, STDEV.P, VAR.S, VAR.P, MODE.SNGL, or a LAMBDA.",
|
|
10285
|
+
},
|
|
10286
|
+
{
|
|
10287
|
+
title: "field_headers [OPTIONAL]",
|
|
10288
|
+
description: "0 no headers, 1 headers in the data but not shown, 2 no headers but generate them, 3 headers in the data and shown. Inferred from the data when omitted.",
|
|
10289
|
+
},
|
|
10290
|
+
{
|
|
10291
|
+
title: "total_depth [OPTIONAL]",
|
|
10292
|
+
description: "0 no totals, 1 grand totals (default), 2 grand totals and subtotals; negative values place the totals above the data.",
|
|
10293
|
+
},
|
|
10294
|
+
{
|
|
10295
|
+
title: "sort_order [OPTIONAL]",
|
|
10296
|
+
description: "Column number to sort the result by; negative sorts descending.",
|
|
10297
|
+
},
|
|
10298
|
+
{
|
|
10299
|
+
title: "filter_array [OPTIONAL]",
|
|
10300
|
+
description: "Column-oriented array of TRUE/FALSE values selecting the rows to include.",
|
|
10301
|
+
},
|
|
10302
|
+
{
|
|
10303
|
+
title: "field_relationship [OPTIONAL]",
|
|
10304
|
+
description: "With more than one row field: 0 for a hierarchy (default) or 1 for a table.",
|
|
10305
|
+
},
|
|
10306
|
+
],
|
|
10307
|
+
},
|
|
10308
|
+
{
|
|
10309
|
+
datatype: "Filter",
|
|
10310
|
+
title: "PIVOTBY",
|
|
10311
|
+
syntax: "PIVOTBY(row_fields, col_fields, values, function, [field_headers], [row_total_depth], [row_sort_order], [col_total_depth], [col_sort_order], [filter_array], [relative_to])",
|
|
10312
|
+
description: "Groups the rows of values by row_fields down the side and col_fields across the top, aggregating each cell with the given function, like a pivot table without the pivot.",
|
|
10313
|
+
example: "PIVOTBY(A2:A20, B2:B20, C2:C20, SUM)",
|
|
10314
|
+
usage: [
|
|
10315
|
+
"PIVOTBY(A2:A20, B2:B20, C2:C20, SUM)",
|
|
10316
|
+
"PIVOTBY(A2:A20, B2:B20, C2:C20, PERCENTOF, 0, 0, 0, 0, 0, , 0)",
|
|
10317
|
+
],
|
|
10318
|
+
parameters: [
|
|
10319
|
+
{
|
|
10320
|
+
title: "row_fields",
|
|
10321
|
+
description: "Column-oriented range or array containing the values that become rows.",
|
|
10322
|
+
},
|
|
10323
|
+
{
|
|
10324
|
+
title: "col_fields",
|
|
10325
|
+
description: "Column-oriented range or array containing the values that become columns.",
|
|
10326
|
+
},
|
|
10327
|
+
{
|
|
10328
|
+
title: "values",
|
|
10329
|
+
description: "Column-oriented range or array containing the values to aggregate.",
|
|
10330
|
+
},
|
|
10331
|
+
{
|
|
10332
|
+
title: "function",
|
|
10333
|
+
description: "The aggregation to apply to each cell: SUM, PERCENTOF, AVERAGE, MEDIAN, COUNT, COUNTA, MAX, MIN, PRODUCT, ARRAYTOTEXT, CONCAT, STDEV.S, STDEV.P, VAR.S, VAR.P, MODE.SNGL, or a LAMBDA.",
|
|
10334
|
+
},
|
|
10335
|
+
{
|
|
10336
|
+
title: "field_headers [OPTIONAL]",
|
|
10337
|
+
description: "0 no headers, 1 headers in the data but not shown, 2 no headers but generate them, 3 headers in the data and shown. Inferred from the data when omitted.",
|
|
10338
|
+
},
|
|
10339
|
+
{
|
|
10340
|
+
title: "row_total_depth [OPTIONAL]",
|
|
10341
|
+
description: "0 no row totals, 1 grand totals (default), 2 grand totals and subtotals; negative values place the totals above the data.",
|
|
10342
|
+
},
|
|
10343
|
+
{
|
|
10344
|
+
title: "row_sort_order [OPTIONAL]",
|
|
10345
|
+
description: "Column number to sort the rows by; negative sorts descending.",
|
|
10346
|
+
},
|
|
10347
|
+
{
|
|
10348
|
+
title: "col_total_depth [OPTIONAL]",
|
|
10349
|
+
description: "0 no column totals, 1 grand totals (default), 2 grand totals and subtotals; negative values place the totals before the data.",
|
|
10350
|
+
},
|
|
10351
|
+
{
|
|
10352
|
+
title: "col_sort_order [OPTIONAL]",
|
|
10353
|
+
description: "Row number to sort the columns by; negative sorts descending.",
|
|
10354
|
+
},
|
|
10355
|
+
{
|
|
10356
|
+
title: "filter_array [OPTIONAL]",
|
|
10357
|
+
description: "Column-oriented array of TRUE/FALSE values selecting the rows to include.",
|
|
10358
|
+
},
|
|
10359
|
+
{
|
|
10360
|
+
title: "relative_to [OPTIONAL]",
|
|
10361
|
+
description: "For PERCENTOF: 0 column totals (default), 1 row totals, 2 grand total, 3 parent column total, 4 parent row total.",
|
|
10362
|
+
},
|
|
10363
|
+
],
|
|
10364
|
+
},
|
|
9808
10365
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../function-descriptions.ts","../../index.ts","../../server.ts","../../types.ts","../../vitest.config.ts","../../formulas/array-formula.ts","../../formulas/crypto-price.ts","../../formulas/datasource.ts","../../formulas/formula-text.ts","../../formulas/get-pivot-data.ts","../../formulas/hyperlink.ts","../../formulas/image.ts","../../formulas/import-data.ts","../../formulas/index.ts","../../formulas/join.ts","../../formulas/multiply.ts","../../formulas/real-time.ts","../../formulas/selection-status.ts","../../formulas/sequence.ts","../../formulas/server.ts","../../formulas/sparkline.ts","../../formulas/split.ts","../../formulas/star-rating.ts","../../formulas/unique.ts"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../../descriptions.ts","../../function-descriptions.ts","../../index.ts","../../server.ts","../../types.ts","../../vitest.config.ts","../../formulas/array-formula.ts","../../formulas/crypto-price.ts","../../formulas/datasource.ts","../../formulas/formula-text.ts","../../formulas/get-pivot-data.ts","../../formulas/hyperlink.ts","../../formulas/image.ts","../../formulas/import-data.ts","../../formulas/index.ts","../../formulas/join.ts","../../formulas/multiply.ts","../../formulas/real-time.ts","../../formulas/selection-status.ts","../../formulas/sequence.ts","../../formulas/server.ts","../../formulas/sparkline.ts","../../formulas/split.ts","../../formulas/star-rating.ts","../../formulas/unique.ts"],"version":"5.8.3"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rowsncolumns/functions/descriptions` — the function catalog on its own.
|
|
3
|
+
*
|
|
4
|
+
* The root entry also re-exports the legacy JavaScript calculator's implementations (`functions`),
|
|
5
|
+
* which pull in `@rowsncolumns/calculator`, `@rowsncolumns/fast-formula-parser` and
|
|
6
|
+
* `@rowsncolumns/toolkit`. A host on the Rust engine only needs the catalog (autocomplete, Insert
|
|
7
|
+
* Function, the conditional-format / data-validation editors), so this entry must stay a pure data
|
|
8
|
+
* module: nothing here may import from `./formulas` or any `@rowsncolumns/*` runtime package.
|
|
9
|
+
* `__tests__/descriptions-subpath.spec.ts` walks the built import graph to hold that (#1135).
|
|
10
|
+
*
|
|
11
|
+
* The specifier carries its `.js` extension so the emitted `dist/esm/descriptions.js` also loads
|
|
12
|
+
* under Node's own ESM resolver (no bundler), not only under bundlers that resolve bare paths.
|
|
13
|
+
*/
|
|
14
|
+
export { functionDescriptions } from "./function-descriptions.js";
|
|
15
|
+
export type { CalculatorFunction, FunctionParameter } from "./types";
|
|
16
|
+
//# sourceMappingURL=descriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptions.d.ts","sourceRoot":"","sources":["../../descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rowsncolumns/functions/descriptions` — the function catalog on its own.
|
|
3
|
+
*
|
|
4
|
+
* The root entry also re-exports the legacy JavaScript calculator's implementations (`functions`),
|
|
5
|
+
* which pull in `@rowsncolumns/calculator`, `@rowsncolumns/fast-formula-parser` and
|
|
6
|
+
* `@rowsncolumns/toolkit`. A host on the Rust engine only needs the catalog (autocomplete, Insert
|
|
7
|
+
* Function, the conditional-format / data-validation editors), so this entry must stay a pure data
|
|
8
|
+
* module: nothing here may import from `./formulas` or any `@rowsncolumns/*` runtime package.
|
|
9
|
+
* `__tests__/descriptions-subpath.spec.ts` walks the built import graph to hold that (#1135).
|
|
10
|
+
*
|
|
11
|
+
* The specifier carries its `.js` extension so the emitted `dist/esm/descriptions.js` also loads
|
|
12
|
+
* under Node's own ESM resolver (no bundler), not only under bundlers that resolve bare paths.
|
|
13
|
+
*/
|
|
14
|
+
export { functionDescriptions } from "./function-descriptions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-descriptions.d.ts","sourceRoot":"","sources":["../../function-descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"function-descriptions.d.ts","sourceRoot":"","sources":["../../function-descriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,eAAO,MAAM,oBAAoB,EAAE,kBAAkB,EAopWpD,CAAC"}
|
|
@@ -9802,4 +9802,561 @@ export const functionDescriptions = [
|
|
|
9802
9802
|
},
|
|
9803
9803
|
],
|
|
9804
9804
|
},
|
|
9805
|
+
{
|
|
9806
|
+
datatype: "Logical",
|
|
9807
|
+
title: "LET",
|
|
9808
|
+
syntax: "LET(name1, value1, [name2, value2], …, calculation)",
|
|
9809
|
+
description: "Assigns names to calculation results so a value is computed once and reused by name inside the final calculation.",
|
|
9810
|
+
example: "LET(x, A1*2, x+x)",
|
|
9811
|
+
usage: [
|
|
9812
|
+
"LET(x, A1*2, x+x)",
|
|
9813
|
+
"LET(total, SUM(A1:A10), count, COUNT(A1:A10), total/count)",
|
|
9814
|
+
],
|
|
9815
|
+
parameters: [
|
|
9816
|
+
{
|
|
9817
|
+
title: "name1",
|
|
9818
|
+
description: "The first name to assign. Must begin with a letter and cannot look like a cell reference.",
|
|
9819
|
+
},
|
|
9820
|
+
{
|
|
9821
|
+
title: "value1",
|
|
9822
|
+
description: "The value assigned to name1.",
|
|
9823
|
+
},
|
|
9824
|
+
{
|
|
9825
|
+
title: "name2, value2, … [OPTIONAL]",
|
|
9826
|
+
description: "Additional name/value pairs; each value can use the names assigned before it.",
|
|
9827
|
+
},
|
|
9828
|
+
{
|
|
9829
|
+
title: "calculation",
|
|
9830
|
+
description: "The expression that uses the assigned names; its result is the result of LET.",
|
|
9831
|
+
},
|
|
9832
|
+
],
|
|
9833
|
+
},
|
|
9834
|
+
{
|
|
9835
|
+
datatype: "Logical",
|
|
9836
|
+
title: "LAMBDA",
|
|
9837
|
+
syntax: "LAMBDA([parameter1, parameter2, …,] calculation)",
|
|
9838
|
+
description: "Creates a reusable custom function from its parameters and a calculation. Call it in place with LAMBDA(…)(arguments), give it a name in the Name Manager, or pass it to MAP, BYROW, REDUCE and the other helper functions.",
|
|
9839
|
+
example: "LAMBDA(x, y, x+y)(1, 2)",
|
|
9840
|
+
usage: ["LAMBDA(x, y, x+y)(1, 2)", "MAP(A1:A5, LAMBDA(v, v*2))"],
|
|
9841
|
+
parameters: [
|
|
9842
|
+
{
|
|
9843
|
+
title: "parameter1, parameter2, … [OPTIONAL]",
|
|
9844
|
+
description: "Names for the values passed when the function is called. Wrap a name in square brackets to make it optional (see ISOMITTED).",
|
|
9845
|
+
},
|
|
9846
|
+
{
|
|
9847
|
+
title: "calculation",
|
|
9848
|
+
description: "The formula evaluated with the parameters; always the last argument and the function's result.",
|
|
9849
|
+
},
|
|
9850
|
+
],
|
|
9851
|
+
},
|
|
9852
|
+
{
|
|
9853
|
+
datatype: "Info",
|
|
9854
|
+
title: "ISOMITTED",
|
|
9855
|
+
syntax: "ISOMITTED(argument)",
|
|
9856
|
+
description: "Returns TRUE when the named LAMBDA parameter was left out of the call, so a custom function can supply a default.",
|
|
9857
|
+
example: "LAMBDA(x, [y], IF(ISOMITTED(y), x, x+y))(5)",
|
|
9858
|
+
usage: [
|
|
9859
|
+
"LAMBDA(x, [y], IF(ISOMITTED(y), x, x+y))(5)",
|
|
9860
|
+
"LAMBDA(x, [y], IF(ISOMITTED(y), x, x+y))(5, 2)",
|
|
9861
|
+
],
|
|
9862
|
+
parameters: [
|
|
9863
|
+
{
|
|
9864
|
+
title: "argument",
|
|
9865
|
+
description: "The LAMBDA parameter to test.",
|
|
9866
|
+
},
|
|
9867
|
+
],
|
|
9868
|
+
},
|
|
9869
|
+
{
|
|
9870
|
+
datatype: "Lookup",
|
|
9871
|
+
title: "XMATCH",
|
|
9872
|
+
syntax: "XMATCH(lookup_value, lookup_array, [match_mode], [search_mode])",
|
|
9873
|
+
description: "Returns the position of a value in a range or array. Exact match by default, with the same match and search modes as XLOOKUP.",
|
|
9874
|
+
example: "XMATCH(E2, B2:B10)",
|
|
9875
|
+
usage: ["XMATCH(E2, B2:B10)", "XMATCH(E2, B2:B10, 1)", 'XMATCH("gr*", B2:B10, 2)'],
|
|
9876
|
+
parameters: [
|
|
9877
|
+
{
|
|
9878
|
+
title: "lookup_value",
|
|
9879
|
+
description: "The value to search for.",
|
|
9880
|
+
},
|
|
9881
|
+
{
|
|
9882
|
+
title: "lookup_array",
|
|
9883
|
+
description: "The range or array to search in.",
|
|
9884
|
+
},
|
|
9885
|
+
{
|
|
9886
|
+
title: "match_mode [OPTIONAL]",
|
|
9887
|
+
description: "0 for exact match (default), -1 for exact or next smaller, 1 for exact or next larger, 2 for wildcard match.",
|
|
9888
|
+
},
|
|
9889
|
+
{
|
|
9890
|
+
title: "search_mode [OPTIONAL]",
|
|
9891
|
+
description: "1 to search first to last (default), -1 last to first, 2 binary search on ascending data, -2 binary search on descending data.",
|
|
9892
|
+
},
|
|
9893
|
+
],
|
|
9894
|
+
},
|
|
9895
|
+
{
|
|
9896
|
+
datatype: "Filter",
|
|
9897
|
+
title: "VSTACK",
|
|
9898
|
+
syntax: "VSTACK(array1, [array2], …)",
|
|
9899
|
+
description: "Appends arrays vertically, one below the other, into a single array; narrower arrays are padded with #N/A.",
|
|
9900
|
+
example: "VSTACK(A1:C3, E1:G2)",
|
|
9901
|
+
usage: ["VSTACK(A1:C3, E1:G2)", "VSTACK({1,2}, {3,4})"],
|
|
9902
|
+
parameters: [
|
|
9903
|
+
{
|
|
9904
|
+
title: "array1",
|
|
9905
|
+
description: "The first range or array to stack.",
|
|
9906
|
+
},
|
|
9907
|
+
{
|
|
9908
|
+
title: "array2, … [OPTIONAL]",
|
|
9909
|
+
description: "Additional ranges or arrays appended below the previous one.",
|
|
9910
|
+
},
|
|
9911
|
+
],
|
|
9912
|
+
},
|
|
9913
|
+
{
|
|
9914
|
+
datatype: "Filter",
|
|
9915
|
+
title: "HSTACK",
|
|
9916
|
+
syntax: "HSTACK(array1, [array2], …)",
|
|
9917
|
+
description: "Appends arrays horizontally, side by side, into a single array; shorter arrays are padded with #N/A.",
|
|
9918
|
+
example: "HSTACK(A1:A3, C1:C3)",
|
|
9919
|
+
usage: ["HSTACK(A1:A3, C1:C3)", "HSTACK({1;2}, {3;4})"],
|
|
9920
|
+
parameters: [
|
|
9921
|
+
{
|
|
9922
|
+
title: "array1",
|
|
9923
|
+
description: "The first range or array to stack.",
|
|
9924
|
+
},
|
|
9925
|
+
{
|
|
9926
|
+
title: "array2, … [OPTIONAL]",
|
|
9927
|
+
description: "Additional ranges or arrays appended to the right of the previous one.",
|
|
9928
|
+
},
|
|
9929
|
+
],
|
|
9930
|
+
},
|
|
9931
|
+
{
|
|
9932
|
+
datatype: "Filter",
|
|
9933
|
+
title: "CHOOSECOLS",
|
|
9934
|
+
syntax: "CHOOSECOLS(array, col_num1, [col_num2], …)",
|
|
9935
|
+
description: "Returns the specified columns of an array, in the order given; negative numbers count from the last column.",
|
|
9936
|
+
example: "CHOOSECOLS(A1:E10, 1, 3)",
|
|
9937
|
+
usage: ["CHOOSECOLS(A1:E10, 1, 3)", "CHOOSECOLS(A1:E10, -1)"],
|
|
9938
|
+
parameters: [
|
|
9939
|
+
{
|
|
9940
|
+
title: "array",
|
|
9941
|
+
description: "The range or array to pick columns from.",
|
|
9942
|
+
},
|
|
9943
|
+
{
|
|
9944
|
+
title: "col_num1",
|
|
9945
|
+
description: "The first column to return; negative counts from the end.",
|
|
9946
|
+
},
|
|
9947
|
+
{
|
|
9948
|
+
title: "col_num2, … [OPTIONAL]",
|
|
9949
|
+
description: "Additional columns to return, in output order.",
|
|
9950
|
+
},
|
|
9951
|
+
],
|
|
9952
|
+
},
|
|
9953
|
+
{
|
|
9954
|
+
datatype: "Filter",
|
|
9955
|
+
title: "CHOOSEROWS",
|
|
9956
|
+
syntax: "CHOOSEROWS(array, row_num1, [row_num2], …)",
|
|
9957
|
+
description: "Returns the specified rows of an array, in the order given; negative numbers count from the last row.",
|
|
9958
|
+
example: "CHOOSEROWS(A1:E10, 1, 3)",
|
|
9959
|
+
usage: ["CHOOSEROWS(A1:E10, 1, 3)", "CHOOSEROWS(A1:E10, -1)"],
|
|
9960
|
+
parameters: [
|
|
9961
|
+
{
|
|
9962
|
+
title: "array",
|
|
9963
|
+
description: "The range or array to pick rows from.",
|
|
9964
|
+
},
|
|
9965
|
+
{
|
|
9966
|
+
title: "row_num1",
|
|
9967
|
+
description: "The first row to return; negative counts from the end.",
|
|
9968
|
+
},
|
|
9969
|
+
{
|
|
9970
|
+
title: "row_num2, … [OPTIONAL]",
|
|
9971
|
+
description: "Additional rows to return, in output order.",
|
|
9972
|
+
},
|
|
9973
|
+
],
|
|
9974
|
+
},
|
|
9975
|
+
{
|
|
9976
|
+
datatype: "Filter",
|
|
9977
|
+
title: "TOCOL",
|
|
9978
|
+
syntax: "TOCOL(array, [ignore], [scan_by_column])",
|
|
9979
|
+
description: "Returns an array as a single column, reading it row by row unless scan_by_column is TRUE.",
|
|
9980
|
+
example: "TOCOL(A1:C3)",
|
|
9981
|
+
usage: ["TOCOL(A1:C3)", "TOCOL(A1:C3, 1)", "TOCOL(A1:C3, 0, TRUE)"],
|
|
9982
|
+
parameters: [
|
|
9983
|
+
{
|
|
9984
|
+
title: "array",
|
|
9985
|
+
description: "The range or array to flatten.",
|
|
9986
|
+
},
|
|
9987
|
+
{
|
|
9988
|
+
title: "ignore [OPTIONAL]",
|
|
9989
|
+
description: "0 keeps every value (default), 1 ignores blanks, 2 ignores errors, 3 ignores blanks and errors.",
|
|
9990
|
+
},
|
|
9991
|
+
{
|
|
9992
|
+
title: "scan_by_column [OPTIONAL]",
|
|
9993
|
+
description: "TRUE to read the array column by column. Defaults to FALSE (row by row).",
|
|
9994
|
+
},
|
|
9995
|
+
],
|
|
9996
|
+
},
|
|
9997
|
+
{
|
|
9998
|
+
datatype: "Filter",
|
|
9999
|
+
title: "TOROW",
|
|
10000
|
+
syntax: "TOROW(array, [ignore], [scan_by_column])",
|
|
10001
|
+
description: "Returns an array as a single row, reading it row by row unless scan_by_column is TRUE.",
|
|
10002
|
+
example: "TOROW(A1:C3)",
|
|
10003
|
+
usage: ["TOROW(A1:C3)", "TOROW(A1:C3, 1)", "TOROW(A1:C3, 0, TRUE)"],
|
|
10004
|
+
parameters: [
|
|
10005
|
+
{
|
|
10006
|
+
title: "array",
|
|
10007
|
+
description: "The range or array to flatten.",
|
|
10008
|
+
},
|
|
10009
|
+
{
|
|
10010
|
+
title: "ignore [OPTIONAL]",
|
|
10011
|
+
description: "0 keeps every value (default), 1 ignores blanks, 2 ignores errors, 3 ignores blanks and errors.",
|
|
10012
|
+
},
|
|
10013
|
+
{
|
|
10014
|
+
title: "scan_by_column [OPTIONAL]",
|
|
10015
|
+
description: "TRUE to read the array column by column. Defaults to FALSE (row by row).",
|
|
10016
|
+
},
|
|
10017
|
+
],
|
|
10018
|
+
},
|
|
10019
|
+
{
|
|
10020
|
+
datatype: "Filter",
|
|
10021
|
+
title: "WRAPROWS",
|
|
10022
|
+
syntax: "WRAPROWS(vector, wrap_count, [pad_with])",
|
|
10023
|
+
description: "Wraps a single row or column of values into rows of wrap_count values each; the last row is padded with pad_with (#N/A by default).",
|
|
10024
|
+
example: "WRAPROWS(A1:A10, 3)",
|
|
10025
|
+
usage: ["WRAPROWS(A1:A10, 3)", 'WRAPROWS(A1:A10, 3, "")'],
|
|
10026
|
+
parameters: [
|
|
10027
|
+
{
|
|
10028
|
+
title: "vector",
|
|
10029
|
+
description: "The single row or column to wrap.",
|
|
10030
|
+
},
|
|
10031
|
+
{
|
|
10032
|
+
title: "wrap_count",
|
|
10033
|
+
description: "Maximum number of values per row.",
|
|
10034
|
+
},
|
|
10035
|
+
{
|
|
10036
|
+
title: "pad_with [OPTIONAL]",
|
|
10037
|
+
description: "Value used to fill the last row. Defaults to #N/A.",
|
|
10038
|
+
},
|
|
10039
|
+
],
|
|
10040
|
+
},
|
|
10041
|
+
{
|
|
10042
|
+
datatype: "Filter",
|
|
10043
|
+
title: "WRAPCOLS",
|
|
10044
|
+
syntax: "WRAPCOLS(vector, wrap_count, [pad_with])",
|
|
10045
|
+
description: "Wraps a single row or column of values into columns of wrap_count values each; the last column is padded with pad_with (#N/A by default).",
|
|
10046
|
+
example: "WRAPCOLS(A1:A10, 3)",
|
|
10047
|
+
usage: ["WRAPCOLS(A1:A10, 3)", 'WRAPCOLS(A1:A10, 3, "")'],
|
|
10048
|
+
parameters: [
|
|
10049
|
+
{
|
|
10050
|
+
title: "vector",
|
|
10051
|
+
description: "The single row or column to wrap.",
|
|
10052
|
+
},
|
|
10053
|
+
{
|
|
10054
|
+
title: "wrap_count",
|
|
10055
|
+
description: "Maximum number of values per column.",
|
|
10056
|
+
},
|
|
10057
|
+
{
|
|
10058
|
+
title: "pad_with [OPTIONAL]",
|
|
10059
|
+
description: "Value used to fill the last column. Defaults to #N/A.",
|
|
10060
|
+
},
|
|
10061
|
+
],
|
|
10062
|
+
},
|
|
10063
|
+
{
|
|
10064
|
+
datatype: "Filter",
|
|
10065
|
+
title: "BYROW",
|
|
10066
|
+
syntax: "BYROW(array, lambda(row))",
|
|
10067
|
+
description: "Applies a LAMBDA to each row of an array and returns one result per row, as a column.",
|
|
10068
|
+
example: "BYROW(A1:C5, LAMBDA(row, SUM(row)))",
|
|
10069
|
+
usage: ["BYROW(A1:C5, LAMBDA(row, SUM(row)))", "BYROW(A1:C5, LAMBDA(row, MAX(row)))"],
|
|
10070
|
+
parameters: [
|
|
10071
|
+
{
|
|
10072
|
+
title: "array",
|
|
10073
|
+
description: "The range or array whose rows are processed.",
|
|
10074
|
+
},
|
|
10075
|
+
{
|
|
10076
|
+
title: "lambda(row)",
|
|
10077
|
+
description: "A LAMBDA with one parameter that receives a row and returns a single value.",
|
|
10078
|
+
},
|
|
10079
|
+
],
|
|
10080
|
+
},
|
|
10081
|
+
{
|
|
10082
|
+
datatype: "Filter",
|
|
10083
|
+
title: "BYCOL",
|
|
10084
|
+
syntax: "BYCOL(array, lambda(column))",
|
|
10085
|
+
description: "Applies a LAMBDA to each column of an array and returns one result per column, as a row.",
|
|
10086
|
+
example: "BYCOL(A1:C5, LAMBDA(col, SUM(col)))",
|
|
10087
|
+
usage: ["BYCOL(A1:C5, LAMBDA(col, SUM(col)))", "BYCOL(A1:C5, LAMBDA(col, MAX(col)))"],
|
|
10088
|
+
parameters: [
|
|
10089
|
+
{
|
|
10090
|
+
title: "array",
|
|
10091
|
+
description: "The range or array whose columns are processed.",
|
|
10092
|
+
},
|
|
10093
|
+
{
|
|
10094
|
+
title: "lambda(column)",
|
|
10095
|
+
description: "A LAMBDA with one parameter that receives a column and returns a single value.",
|
|
10096
|
+
},
|
|
10097
|
+
],
|
|
10098
|
+
},
|
|
10099
|
+
{
|
|
10100
|
+
datatype: "Filter",
|
|
10101
|
+
title: "MAP",
|
|
10102
|
+
syntax: "MAP(array1, [array2, …], lambda(value1, [value2, …]))",
|
|
10103
|
+
description: "Applies a LAMBDA to each value of one or more arrays and returns an array of the same shape.",
|
|
10104
|
+
example: "MAP(A1:A5, LAMBDA(v, v*2))",
|
|
10105
|
+
usage: ["MAP(A1:A5, LAMBDA(v, v*2))", "MAP(A1:A5, B1:B5, LAMBDA(a, b, a&b))"],
|
|
10106
|
+
parameters: [
|
|
10107
|
+
{
|
|
10108
|
+
title: "array1",
|
|
10109
|
+
description: "The range or array to map.",
|
|
10110
|
+
},
|
|
10111
|
+
{
|
|
10112
|
+
title: "array2, … [OPTIONAL]",
|
|
10113
|
+
description: "Additional arrays of the same shape, passed to the LAMBDA as further parameters.",
|
|
10114
|
+
},
|
|
10115
|
+
{
|
|
10116
|
+
title: "lambda(value1, [value2, …])",
|
|
10117
|
+
description: "A LAMBDA with one parameter per array that returns the new value.",
|
|
10118
|
+
},
|
|
10119
|
+
],
|
|
10120
|
+
},
|
|
10121
|
+
{
|
|
10122
|
+
datatype: "Filter",
|
|
10123
|
+
title: "REDUCE",
|
|
10124
|
+
syntax: "REDUCE([initial_value], array, lambda(accumulator, value))",
|
|
10125
|
+
description: "Folds an array into a single value by calling a LAMBDA with the running accumulator and each value in turn.",
|
|
10126
|
+
example: "REDUCE(0, A1:A5, LAMBDA(acc, v, acc+v))",
|
|
10127
|
+
usage: ["REDUCE(0, A1:A5, LAMBDA(acc, v, acc+v))", "REDUCE(1, A1:A5, LAMBDA(acc, v, acc*v))"],
|
|
10128
|
+
parameters: [
|
|
10129
|
+
{
|
|
10130
|
+
title: "initial_value [OPTIONAL]",
|
|
10131
|
+
description: "The accumulator's starting value.",
|
|
10132
|
+
},
|
|
10133
|
+
{
|
|
10134
|
+
title: "array",
|
|
10135
|
+
description: "The range or array to fold.",
|
|
10136
|
+
},
|
|
10137
|
+
{
|
|
10138
|
+
title: "lambda(accumulator, value)",
|
|
10139
|
+
description: "A LAMBDA with two parameters that returns the next accumulator.",
|
|
10140
|
+
},
|
|
10141
|
+
],
|
|
10142
|
+
},
|
|
10143
|
+
{
|
|
10144
|
+
datatype: "Filter",
|
|
10145
|
+
title: "SCAN",
|
|
10146
|
+
syntax: "SCAN([initial_value], array, lambda(accumulator, value))",
|
|
10147
|
+
description: "Like REDUCE, but returns every intermediate accumulator as an array of the same shape as the input.",
|
|
10148
|
+
example: "SCAN(0, A1:A5, LAMBDA(acc, v, acc+v))",
|
|
10149
|
+
usage: ["SCAN(0, A1:A5, LAMBDA(acc, v, acc+v))", 'SCAN("", A1:A5, LAMBDA(acc, v, acc&v))'],
|
|
10150
|
+
parameters: [
|
|
10151
|
+
{
|
|
10152
|
+
title: "initial_value [OPTIONAL]",
|
|
10153
|
+
description: "The accumulator's starting value.",
|
|
10154
|
+
},
|
|
10155
|
+
{
|
|
10156
|
+
title: "array",
|
|
10157
|
+
description: "The range or array to scan.",
|
|
10158
|
+
},
|
|
10159
|
+
{
|
|
10160
|
+
title: "lambda(accumulator, value)",
|
|
10161
|
+
description: "A LAMBDA with two parameters that returns the next accumulator.",
|
|
10162
|
+
},
|
|
10163
|
+
],
|
|
10164
|
+
},
|
|
10165
|
+
{
|
|
10166
|
+
datatype: "Filter",
|
|
10167
|
+
title: "MAKEARRAY",
|
|
10168
|
+
syntax: "MAKEARRAY(rows, columns, lambda(row, column))",
|
|
10169
|
+
description: "Builds an array of the given size by calling a LAMBDA with each row and column number.",
|
|
10170
|
+
example: "MAKEARRAY(3, 3, LAMBDA(r, c, r*c))",
|
|
10171
|
+
usage: ["MAKEARRAY(3, 3, LAMBDA(r, c, r*c))", 'MAKEARRAY(2, 2, LAMBDA(r, c, "R"&r&"C"&c))'],
|
|
10172
|
+
parameters: [
|
|
10173
|
+
{
|
|
10174
|
+
title: "rows",
|
|
10175
|
+
description: "Number of rows in the result.",
|
|
10176
|
+
},
|
|
10177
|
+
{
|
|
10178
|
+
title: "columns",
|
|
10179
|
+
description: "Number of columns in the result.",
|
|
10180
|
+
},
|
|
10181
|
+
{
|
|
10182
|
+
title: "lambda(row, column)",
|
|
10183
|
+
description: "A LAMBDA with two parameters that returns the value for that row and column (both 1-based).",
|
|
10184
|
+
},
|
|
10185
|
+
],
|
|
10186
|
+
},
|
|
10187
|
+
{
|
|
10188
|
+
datatype: "Text",
|
|
10189
|
+
title: "TEXTBEFORE",
|
|
10190
|
+
syntax: "TEXTBEFORE(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])",
|
|
10191
|
+
description: "Returns the text that comes before the nth occurrence of a delimiter; a negative instance number counts occurrences from the end.",
|
|
10192
|
+
example: 'TEXTBEFORE("Red riding hood", " ")',
|
|
10193
|
+
usage: [
|
|
10194
|
+
'TEXTBEFORE("Red riding hood", " ")',
|
|
10195
|
+
'TEXTBEFORE("Red riding hood", " ", -1)',
|
|
10196
|
+
'TEXTBEFORE("a-b-c", "-", 2)',
|
|
10197
|
+
],
|
|
10198
|
+
parameters: [
|
|
10199
|
+
{
|
|
10200
|
+
title: "text",
|
|
10201
|
+
description: "The text to search in.",
|
|
10202
|
+
},
|
|
10203
|
+
{
|
|
10204
|
+
title: "delimiter",
|
|
10205
|
+
description: "The text (or array of texts) that marks the point before which to extract.",
|
|
10206
|
+
},
|
|
10207
|
+
{
|
|
10208
|
+
title: "instance_num [OPTIONAL]",
|
|
10209
|
+
description: "Which occurrence of the delimiter to use. Defaults to 1; negative counts from the end.",
|
|
10210
|
+
},
|
|
10211
|
+
{
|
|
10212
|
+
title: "match_mode [OPTIONAL]",
|
|
10213
|
+
description: "0 for case-sensitive (default) or 1 for case-insensitive delimiter matching.",
|
|
10214
|
+
},
|
|
10215
|
+
{
|
|
10216
|
+
title: "match_end [OPTIONAL]",
|
|
10217
|
+
description: "1 treats the end of the text as a delimiter. Defaults to 0.",
|
|
10218
|
+
},
|
|
10219
|
+
{
|
|
10220
|
+
title: "if_not_found [OPTIONAL]",
|
|
10221
|
+
description: "Value returned when the delimiter is not found. Defaults to #N/A.",
|
|
10222
|
+
},
|
|
10223
|
+
],
|
|
10224
|
+
},
|
|
10225
|
+
{
|
|
10226
|
+
datatype: "Text",
|
|
10227
|
+
title: "TEXTAFTER",
|
|
10228
|
+
syntax: "TEXTAFTER(text, delimiter, [instance_num], [match_mode], [match_end], [if_not_found])",
|
|
10229
|
+
description: "Returns the text that comes after the nth occurrence of a delimiter; a negative instance number counts occurrences from the end.",
|
|
10230
|
+
example: 'TEXTAFTER("Red riding hood", " ")',
|
|
10231
|
+
usage: [
|
|
10232
|
+
'TEXTAFTER("Red riding hood", " ")',
|
|
10233
|
+
'TEXTAFTER("Red riding hood", " ", -1)',
|
|
10234
|
+
'TEXTAFTER("a-b-c", "-", 2)',
|
|
10235
|
+
],
|
|
10236
|
+
parameters: [
|
|
10237
|
+
{
|
|
10238
|
+
title: "text",
|
|
10239
|
+
description: "The text to search in.",
|
|
10240
|
+
},
|
|
10241
|
+
{
|
|
10242
|
+
title: "delimiter",
|
|
10243
|
+
description: "The text (or array of texts) that marks the point after which to extract.",
|
|
10244
|
+
},
|
|
10245
|
+
{
|
|
10246
|
+
title: "instance_num [OPTIONAL]",
|
|
10247
|
+
description: "Which occurrence of the delimiter to use. Defaults to 1; negative counts from the end.",
|
|
10248
|
+
},
|
|
10249
|
+
{
|
|
10250
|
+
title: "match_mode [OPTIONAL]",
|
|
10251
|
+
description: "0 for case-sensitive (default) or 1 for case-insensitive delimiter matching.",
|
|
10252
|
+
},
|
|
10253
|
+
{
|
|
10254
|
+
title: "match_end [OPTIONAL]",
|
|
10255
|
+
description: "1 treats the start of the text as a delimiter. Defaults to 0.",
|
|
10256
|
+
},
|
|
10257
|
+
{
|
|
10258
|
+
title: "if_not_found [OPTIONAL]",
|
|
10259
|
+
description: "Value returned when the delimiter is not found. Defaults to #N/A.",
|
|
10260
|
+
},
|
|
10261
|
+
],
|
|
10262
|
+
},
|
|
10263
|
+
{
|
|
10264
|
+
datatype: "Filter",
|
|
10265
|
+
title: "GROUPBY",
|
|
10266
|
+
syntax: "GROUPBY(row_fields, values, function, [field_headers], [total_depth], [sort_order], [filter_array], [field_relationship])",
|
|
10267
|
+
description: "Groups the rows of values by the values in row_fields and aggregates each group with the given function, returning a summary table with totals.",
|
|
10268
|
+
example: "GROUPBY(A2:A20, C2:C20, SUM)",
|
|
10269
|
+
usage: ["GROUPBY(A2:A20, C2:C20, SUM)", "GROUPBY(A2:A20, C2:C20, AVERAGE, 0, 0, -2)"],
|
|
10270
|
+
parameters: [
|
|
10271
|
+
{
|
|
10272
|
+
title: "row_fields",
|
|
10273
|
+
description: "Column-oriented range or array containing the values to group by.",
|
|
10274
|
+
},
|
|
10275
|
+
{
|
|
10276
|
+
title: "values",
|
|
10277
|
+
description: "Column-oriented range or array containing the values to aggregate.",
|
|
10278
|
+
},
|
|
10279
|
+
{
|
|
10280
|
+
title: "function",
|
|
10281
|
+
description: "The aggregation to apply to each group: SUM, PERCENTOF, AVERAGE, MEDIAN, COUNT, COUNTA, MAX, MIN, PRODUCT, ARRAYTOTEXT, CONCAT, STDEV.S, STDEV.P, VAR.S, VAR.P, MODE.SNGL, or a LAMBDA.",
|
|
10282
|
+
},
|
|
10283
|
+
{
|
|
10284
|
+
title: "field_headers [OPTIONAL]",
|
|
10285
|
+
description: "0 no headers, 1 headers in the data but not shown, 2 no headers but generate them, 3 headers in the data and shown. Inferred from the data when omitted.",
|
|
10286
|
+
},
|
|
10287
|
+
{
|
|
10288
|
+
title: "total_depth [OPTIONAL]",
|
|
10289
|
+
description: "0 no totals, 1 grand totals (default), 2 grand totals and subtotals; negative values place the totals above the data.",
|
|
10290
|
+
},
|
|
10291
|
+
{
|
|
10292
|
+
title: "sort_order [OPTIONAL]",
|
|
10293
|
+
description: "Column number to sort the result by; negative sorts descending.",
|
|
10294
|
+
},
|
|
10295
|
+
{
|
|
10296
|
+
title: "filter_array [OPTIONAL]",
|
|
10297
|
+
description: "Column-oriented array of TRUE/FALSE values selecting the rows to include.",
|
|
10298
|
+
},
|
|
10299
|
+
{
|
|
10300
|
+
title: "field_relationship [OPTIONAL]",
|
|
10301
|
+
description: "With more than one row field: 0 for a hierarchy (default) or 1 for a table.",
|
|
10302
|
+
},
|
|
10303
|
+
],
|
|
10304
|
+
},
|
|
10305
|
+
{
|
|
10306
|
+
datatype: "Filter",
|
|
10307
|
+
title: "PIVOTBY",
|
|
10308
|
+
syntax: "PIVOTBY(row_fields, col_fields, values, function, [field_headers], [row_total_depth], [row_sort_order], [col_total_depth], [col_sort_order], [filter_array], [relative_to])",
|
|
10309
|
+
description: "Groups the rows of values by row_fields down the side and col_fields across the top, aggregating each cell with the given function, like a pivot table without the pivot.",
|
|
10310
|
+
example: "PIVOTBY(A2:A20, B2:B20, C2:C20, SUM)",
|
|
10311
|
+
usage: [
|
|
10312
|
+
"PIVOTBY(A2:A20, B2:B20, C2:C20, SUM)",
|
|
10313
|
+
"PIVOTBY(A2:A20, B2:B20, C2:C20, PERCENTOF, 0, 0, 0, 0, 0, , 0)",
|
|
10314
|
+
],
|
|
10315
|
+
parameters: [
|
|
10316
|
+
{
|
|
10317
|
+
title: "row_fields",
|
|
10318
|
+
description: "Column-oriented range or array containing the values that become rows.",
|
|
10319
|
+
},
|
|
10320
|
+
{
|
|
10321
|
+
title: "col_fields",
|
|
10322
|
+
description: "Column-oriented range or array containing the values that become columns.",
|
|
10323
|
+
},
|
|
10324
|
+
{
|
|
10325
|
+
title: "values",
|
|
10326
|
+
description: "Column-oriented range or array containing the values to aggregate.",
|
|
10327
|
+
},
|
|
10328
|
+
{
|
|
10329
|
+
title: "function",
|
|
10330
|
+
description: "The aggregation to apply to each cell: SUM, PERCENTOF, AVERAGE, MEDIAN, COUNT, COUNTA, MAX, MIN, PRODUCT, ARRAYTOTEXT, CONCAT, STDEV.S, STDEV.P, VAR.S, VAR.P, MODE.SNGL, or a LAMBDA.",
|
|
10331
|
+
},
|
|
10332
|
+
{
|
|
10333
|
+
title: "field_headers [OPTIONAL]",
|
|
10334
|
+
description: "0 no headers, 1 headers in the data but not shown, 2 no headers but generate them, 3 headers in the data and shown. Inferred from the data when omitted.",
|
|
10335
|
+
},
|
|
10336
|
+
{
|
|
10337
|
+
title: "row_total_depth [OPTIONAL]",
|
|
10338
|
+
description: "0 no row totals, 1 grand totals (default), 2 grand totals and subtotals; negative values place the totals above the data.",
|
|
10339
|
+
},
|
|
10340
|
+
{
|
|
10341
|
+
title: "row_sort_order [OPTIONAL]",
|
|
10342
|
+
description: "Column number to sort the rows by; negative sorts descending.",
|
|
10343
|
+
},
|
|
10344
|
+
{
|
|
10345
|
+
title: "col_total_depth [OPTIONAL]",
|
|
10346
|
+
description: "0 no column totals, 1 grand totals (default), 2 grand totals and subtotals; negative values place the totals before the data.",
|
|
10347
|
+
},
|
|
10348
|
+
{
|
|
10349
|
+
title: "col_sort_order [OPTIONAL]",
|
|
10350
|
+
description: "Row number to sort the columns by; negative sorts descending.",
|
|
10351
|
+
},
|
|
10352
|
+
{
|
|
10353
|
+
title: "filter_array [OPTIONAL]",
|
|
10354
|
+
description: "Column-oriented array of TRUE/FALSE values selecting the rows to include.",
|
|
10355
|
+
},
|
|
10356
|
+
{
|
|
10357
|
+
title: "relative_to [OPTIONAL]",
|
|
10358
|
+
description: "For PERCENTOF: 0 column totals (default), 1 row totals, 2 grand total, 3 parent column total, 4 parent row total.",
|
|
10359
|
+
},
|
|
10360
|
+
],
|
|
10361
|
+
},
|
|
9805
10362
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../../function-descriptions.ts","../../index.ts","../../server.ts","../../types.ts","../../vitest.config.ts","../../formulas/array-formula.ts","../../formulas/crypto-price.ts","../../formulas/datasource.ts","../../formulas/formula-text.ts","../../formulas/get-pivot-data.ts","../../formulas/hyperlink.ts","../../formulas/image.ts","../../formulas/import-data.ts","../../formulas/index.ts","../../formulas/join.ts","../../formulas/multiply.ts","../../formulas/real-time.ts","../../formulas/selection-status.ts","../../formulas/sequence.ts","../../formulas/server.ts","../../formulas/sparkline.ts","../../formulas/split.ts","../../formulas/star-rating.ts","../../formulas/unique.ts"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../../descriptions.ts","../../function-descriptions.ts","../../index.ts","../../server.ts","../../types.ts","../../vitest.config.ts","../../formulas/array-formula.ts","../../formulas/crypto-price.ts","../../formulas/datasource.ts","../../formulas/formula-text.ts","../../formulas/get-pivot-data.ts","../../formulas/hyperlink.ts","../../formulas/image.ts","../../formulas/import-data.ts","../../formulas/index.ts","../../formulas/join.ts","../../formulas/multiply.ts","../../formulas/real-time.ts","../../formulas/selection-status.ts","../../formulas/sequence.ts","../../formulas/server.ts","../../formulas/sparkline.ts","../../formulas/split.ts","../../formulas/star-rating.ts","../../formulas/unique.ts"],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rowsncolumns/functions",
|
|
3
|
-
"version": "15.0
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"author": "Vinay M",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
7
7
|
"module": "./dist/esm/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"types": "./dist/esm/index.d.ts",
|
|
10
11
|
"import": "./dist/esm/index.js",
|
|
11
12
|
"require": "./dist/cjs/index.js"
|
|
12
13
|
},
|
|
14
|
+
"./descriptions": {
|
|
15
|
+
"types": "./dist/esm/descriptions.d.ts",
|
|
16
|
+
"import": "./dist/esm/descriptions.js",
|
|
17
|
+
"require": "./dist/cjs/descriptions.js"
|
|
18
|
+
},
|
|
13
19
|
"./server": {
|
|
20
|
+
"types": "./dist/esm/server.d.ts",
|
|
14
21
|
"import": "./dist/esm/server.js",
|
|
15
22
|
"require": "./dist/cjs/server.js"
|
|
16
23
|
}
|
|
17
24
|
},
|
|
25
|
+
"sideEffects": false,
|
|
18
26
|
"scripts": {
|
|
19
27
|
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json",
|
|
20
28
|
"clean": "rimraf dist",
|
|
@@ -34,11 +42,11 @@
|
|
|
34
42
|
"url": "https://github.com/rowsncolumns/spreadsheet/issues"
|
|
35
43
|
},
|
|
36
44
|
"devDependencies": {
|
|
37
|
-
"@rowsncolumns/common-types": ">=5.
|
|
38
|
-
"@rowsncolumns/calculator": ">=7.3.
|
|
39
|
-
"@rowsncolumns/fast-formula-parser": ">=6.2.
|
|
40
|
-
"@rowsncolumns/utils": ">=9.
|
|
41
|
-
"@rowsncolumns/toolkit": ">=24.5.
|
|
45
|
+
"@rowsncolumns/common-types": ">=5.3.1",
|
|
46
|
+
"@rowsncolumns/calculator": ">=7.3.2",
|
|
47
|
+
"@rowsncolumns/fast-formula-parser": ">=6.2.43",
|
|
48
|
+
"@rowsncolumns/utils": ">=9.5.1",
|
|
49
|
+
"@rowsncolumns/toolkit": ">=24.5.15"
|
|
42
50
|
},
|
|
43
51
|
"peerDependencies": {
|
|
44
52
|
"@rowsncolumns/common-types": ">=5.2.32",
|