@sheetxl/formulas 0.7.28-beta.4 → 0.8.0-beta.10

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.
Files changed (128) hide show
  1. package/README.md +15 -22
  2. package/browser/esm/{DQXZXiayIDbfnOUM.mjs → -sN4SmS9cUOrcjVR.mjs} +1 -1
  3. package/browser/esm/{K0CU2XaCnJJwh9a5.mjs → 0Q46gxHg8afOLJ7K.mjs} +37 -3
  4. package/{node/esm/B2zbBC2YuaYszbHd.mjs → browser/esm/B-Ig6HWcV53g7Zy0.mjs} +1 -1
  5. package/browser/esm/{ec8i9mVgadWEbuYy.mjs → B3LvTqivuAJYZW9O.mjs} +1 -1
  6. package/browser/esm/{CB4iUafw8x-4z_ff.mjs → B52kG70ukWJKrVHl.mjs} +2 -5
  7. package/browser/esm/{BXyQ76W9hObzOdf2.mjs → B9GCCzx3ZtHrtgsZ.mjs} +1 -1
  8. package/{node/esm/CmxGNGhfoNTz4Ku7.mjs → browser/esm/BCRhRyTDe0QO3_TF.mjs} +2 -2
  9. package/browser/esm/{DNz39xRoqy8IPYb3.mjs → BTygNwyrCzzpikEl.mjs} +1 -1
  10. package/{node/esm/BIxWkCV-r5U5zPnQ.mjs → browser/esm/C1TlAj8cFI90ziZT.mjs} +51 -11
  11. package/browser/esm/{Ctxig2_c-GErg911.mjs → C2WtsJFzD2GtwSHc.mjs} +69 -4
  12. package/{node/esm/BM0KaGfI1Lqav17f.mjs → browser/esm/C2nw0NszguSU0idO.mjs} +1 -1
  13. package/browser/esm/{AuzqFslmIMxseCn8.mjs → CXDwT-uLbi_ZUF6Q.mjs} +1 -1
  14. package/browser/esm/{jFM2MqBdxFWP6QmN.mjs → CXvEGkvOOLo4v17T.mjs} +1 -1
  15. package/browser/esm/{B2b-ZmAhe94pNDT0.mjs → CYtUFqOZCtbGw6Sa.mjs} +1 -1
  16. package/browser/esm/{DIUPlZfIoj507k-C.mjs → CpGJ_hA0h7CW4Jwu.mjs} +1 -1
  17. package/{node/esm/CWI62PClHru85-mL.mjs → browser/esm/CrfZkfvKRkK2qzpP.mjs} +1 -1
  18. package/browser/esm/{BHG0YIMg5kOV3mNl.mjs → D-w_d2PrWN8kwM-Z.mjs} +1 -1
  19. package/browser/esm/{VRXC1SwOYSkv1Vs4.mjs → DG5YNbA9Ya6Uu3DG.mjs} +1 -1
  20. package/{node/esm/ymPI-MJUjuYe2n5v.mjs → browser/esm/DO9cbfqY2roOBQQi.mjs} +1 -1
  21. package/{node/esm/Co7O0P5yM1i0exNK.mjs → browser/esm/DYoyWWN86dEdpzVg.mjs} +1 -1
  22. package/browser/esm/{wDeMNrClyQscDTwZ.mjs → D_PYZQxUASNNORTU.mjs} +48 -2
  23. package/{node/esm/DjFalvyAcEOwNagC.mjs → browser/esm/KekfJtUQq6sPOmPq.mjs} +1 -1
  24. package/browser/esm/{DiV1y5wtlmlsRDfm.mjs → PDRj7r-fmSBrQgPS.mjs} +1 -1
  25. package/browser/esm/index.mjs +5186 -5889
  26. package/licenses/dependencies.txt +0 -33
  27. package/node/esm/{DQXZXiayIDbfnOUM.mjs → -sN4SmS9cUOrcjVR.mjs} +1 -1
  28. package/node/esm/{K0CU2XaCnJJwh9a5.mjs → 0Q46gxHg8afOLJ7K.mjs} +37 -3
  29. package/{browser/esm/B2zbBC2YuaYszbHd.mjs → node/esm/B-Ig6HWcV53g7Zy0.mjs} +1 -1
  30. package/node/esm/{CB4iUafw8x-4z_ff.mjs → B52kG70ukWJKrVHl.mjs} +2 -5
  31. package/node/esm/{BXyQ76W9hObzOdf2.mjs → B9GCCzx3ZtHrtgsZ.mjs} +1 -1
  32. package/{browser/esm/CmxGNGhfoNTz4Ku7.mjs → node/esm/BCRhRyTDe0QO3_TF.mjs} +2 -2
  33. package/node/esm/{Dnrd8jP_j1AWCUX6.mjs → BN0QCtL-dZU8U-hd.mjs} +1 -1
  34. package/node/esm/{8_dh9QnzvNBCvWpp.mjs → Bp4XujtHH5z4dKlz.mjs} +1 -1
  35. package/{browser/esm/BIxWkCV-r5U5zPnQ.mjs → node/esm/C--VBbIp253pJfw9.mjs} +51 -11
  36. package/node/esm/{BsBiI5HHw7jjXgp5.mjs → C-jlV3objhN9hpyt.mjs} +1 -1
  37. package/node/esm/{D1iK18Nn8mRQo6Fk.mjs → C1Qq-yVzO0uZUnVb.mjs} +1 -1
  38. package/node/esm/{Ctxig2_c-GErg911.mjs → C2WtsJFzD2GtwSHc.mjs} +69 -4
  39. package/{browser/esm/BM0KaGfI1Lqav17f.mjs → node/esm/C2nw0NszguSU0idO.mjs} +1 -1
  40. package/node/esm/{B2b-ZmAhe94pNDT0.mjs → CYtUFqOZCtbGw6Sa.mjs} +1 -1
  41. package/node/esm/{DcSbVdpEmRbpaZf0.mjs → Cf28UVIhJr5Y-_24.mjs} +1 -1
  42. package/node/esm/{wDeMNrClyQscDTwZ.mjs → CkO4Hx9aLq7m3emI.mjs} +48 -2
  43. package/{browser/esm/CWI62PClHru85-mL.mjs → node/esm/CrfZkfvKRkK2qzpP.mjs} +1 -1
  44. package/node/esm/{BHG0YIMg5kOV3mNl.mjs → D-w_d2PrWN8kwM-Z.mjs} +1 -1
  45. package/node/esm/{VRXC1SwOYSkv1Vs4.mjs → DG5YNbA9Ya6Uu3DG.mjs} +1 -1
  46. package/{browser/esm/ymPI-MJUjuYe2n5v.mjs → node/esm/DO9cbfqY2roOBQQi.mjs} +1 -1
  47. package/{browser/esm/Co7O0P5yM1i0exNK.mjs → node/esm/DYoyWWN86dEdpzVg.mjs} +1 -1
  48. package/{browser/esm/DjFalvyAcEOwNagC.mjs → node/esm/KekfJtUQq6sPOmPq.mjs} +1 -1
  49. package/node/esm/{DiV1y5wtlmlsRDfm.mjs → PDRj7r-fmSBrQgPS.mjs} +1 -1
  50. package/node/esm/index.mjs +5778 -4648
  51. package/package.json +6 -8
  52. package/types/src/.generated/decl/dateTime/Date.decl.d.ts +2 -1
  53. package/types/src/.generated/decl/information/Information.decl.d.ts +2 -1
  54. package/types/src/.generated/decl/lookupReference/Reference.decl.d.ts +2 -1
  55. package/types/src/.generated/decl/mathTrig/Math.decl.d.ts +2 -1
  56. package/types/src/.generated/desc/dateTime/Date.desc.d.ts +2 -1
  57. package/types/src/.generated/desc/information/Information.desc.d.ts +2 -1
  58. package/types/src/.generated/desc/lookupReference/Reference.desc.d.ts +2 -1
  59. package/types/src/.generated/desc/mathTrig/Math.desc.d.ts +2 -1
  60. package/types/src/_utils/AValues.d.ts +30 -0
  61. package/types/src/_utils/AggregateIFS.d.ts +5 -3
  62. package/types/src/_utils/Arithmetic.d.ts +36 -0
  63. package/types/src/_utils/Combinatorics.d.ts +20 -0
  64. package/types/src/_utils/Distributions.d.ts +94 -0
  65. package/types/src/_utils/Errors.d.ts +1 -20
  66. package/types/src/_utils/FirstCell.d.ts +32 -0
  67. package/types/src/_utils/Matrix.d.ts +31 -0
  68. package/types/src/_utils/SpecialFunctions.d.ts +91 -0
  69. package/types/src/_utils/X87.d.ts +28 -0
  70. package/types/src/database/Database.d.ts +25 -25
  71. package/types/src/dateTime/Date.d.ts +250 -41
  72. package/types/src/engineering/Bessel.d.ts +9 -9
  73. package/types/src/engineering/Bitwise.d.ts +35 -35
  74. package/types/src/engineering/Convert.d.ts +3 -3
  75. package/types/src/engineering/Engineering.d.ts +5 -5
  76. package/types/src/engineering/Error.d.ts +9 -9
  77. package/types/src/engineering/Imaginary.d.ts +54 -54
  78. package/types/src/information/Information.d.ts +124 -55
  79. package/types/src/japanese/Date.d.ts +2 -2
  80. package/types/src/japanese/Text.d.ts +1 -1
  81. package/types/src/logical/Logical.d.ts +45 -39
  82. package/types/src/lookupReference/Reference.d.ts +212 -86
  83. package/types/src/mathTrig/Math.d.ts +499 -149
  84. package/types/src/mathTrig/Trig.d.ts +26 -22
  85. package/types/src/operators/Operators.d.ts +15 -15
  86. package/types/src/statistical/Distribution.d.ts +157 -161
  87. package/types/src/statistical/Statistical.d.ts +37 -37
  88. package/types/src/testing/Testing.d.ts +2 -2
  89. package/types/src/text/Text.d.ts +119 -54
  90. package/types/src/thai/Text.d.ts +1 -1
  91. package/types/src/web/FilterXML.d.ts +1 -1
  92. package/types/src/web/Web.d.ts +2 -2
  93. package/browser/cjs/1XrWGMP3GmsQOMIX.cjs +0 -1
  94. package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
  95. package/browser/cjs/4nReftSsKWmnRdtf.cjs +0 -1
  96. package/browser/cjs/507hQYooKKjnRzsZ.cjs +0 -1
  97. package/browser/cjs/BAxVLKkxFgI6cXnR.cjs +0 -1
  98. package/browser/cjs/BK0SCfN_VZYqBxoQ.cjs +0 -1
  99. package/browser/cjs/Btc0Nzu40VYOpzLX.cjs +0 -1
  100. package/browser/cjs/C9C-pr-T_ThweQX9.cjs +0 -1
  101. package/browser/cjs/CJYewYJ5Z3iojl7J.cjs +0 -1
  102. package/browser/cjs/CRx1WvmgBjT8WVyB.cjs +0 -1
  103. package/browser/cjs/CV4KQsHluMqo1I2Q.cjs +0 -1
  104. package/browser/cjs/CXlzsh_WHCOsErJ1.cjs +0 -1
  105. package/browser/cjs/CpJJh4UnFl1_qFui.cjs +0 -1
  106. package/browser/cjs/CrZlUtdX1h2RUnCP.cjs +0 -1
  107. package/browser/cjs/D8-KovdJ0LjxqCe2.cjs +0 -1
  108. package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
  109. package/browser/cjs/DDnGLOLTqLFsdUDS.cjs +0 -1
  110. package/browser/cjs/DG2kqsWRUtVugjay.cjs +0 -1
  111. package/browser/cjs/DM7-R_ltoLbA9jde.cjs +0 -1
  112. package/browser/cjs/DNKyaSruDogoBd2H.cjs +0 -1
  113. package/browser/cjs/Du4jBiFxRIF1OjD4.cjs +0 -1
  114. package/browser/cjs/EeOVMRq7TuptFKTc.cjs +0 -1
  115. package/browser/cjs/Kvn916ebqGc4t6hv.cjs +0 -1
  116. package/browser/cjs/aONv0Ys3C8xmnaR8.cjs +0 -1
  117. package/browser/cjs/index.cjs +0 -1
  118. package/browser/cjs/z_rZE1OHFPpdGBh4.cjs +0 -1
  119. package/browser/esm/74anAHR6YDREjbgI.mjs +0 -24
  120. package/browser/esm/BebVPCumXxQqABDP.mjs +0 -21
  121. package/node/esm/74anAHR6YDREjbgI.mjs +0 -24
  122. package/node/esm/BebVPCumXxQqABDP.mjs +0 -21
  123. package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +0 -4
  124. package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +0 -4
  125. package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +0 -4
  126. package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +0 -4
  127. package/types/src/lookupReference/GroupBy.d.ts +0 -19
  128. package/types/src/lookupReference/PivotBy.d.ts +0 -24
@@ -1,28 +1,28 @@
1
- import { IRange, AcceptError, AcceptRefError, Scalar, IReferenceRange, IRichData, Repeating, Flatten, Omittable } from '@sheetxl/primitives';
1
+ import { IRange, FormulaError, AcceptError, Scalar, IReferenceRange, IRichData, Repeating, Flatten, Lazy, Omittable, NoLift, ReportType } from '@sheetxl/primitives';
2
2
  /**
3
- * @summary Creates a cell reference as text, given specified row and column numbers.
3
+ * Creates a cell reference as text, given specified row and column numbers.
4
4
  * @param rowNum is the row number to use in the cell reference: Row_number = 1 for row 1.
5
5
  * @param columnNum is the column number to use in the cell reference. For example, Column_number = 4 for column D.
6
6
  * @param absNum specifies the reference type: absolute = 1; absolute row/relative column = 2; relative row/absolute column = 3; relative = 4.
7
7
  * @param a1 is a logical value that specifies the reference style: A1 style = 1 or TRUE; R1C1 style = 0 or FALSE.
8
8
  * @param sheetText is text specifying the name of the worksheet to be used as the external reference.
9
9
  */
10
- export declare function ADDRESS(rowNum: number, columnNum: number, absNum?: Omittable<number>, a1?: Omittable<boolean>, sheetText?: string): string;
10
+ export declare function ADDRESS(rowNum: number, columnNum: number, absNum?: Omittable<number>, a1?: Omittable<boolean>, sheetText?: Omittable<string>): string;
11
11
  /**
12
- * @summary Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell.
12
+ * Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell.
13
13
  * @param references is a reference to a cell or range of cells and can refer to multiple areas.
14
14
  */
15
- export declare function AREAS(references: Flatten<AcceptError<IReferenceRange>>): number;
15
+ export declare function AREAS(references: Flatten<IReferenceRange>): number;
16
16
  /**
17
- * @summary Constrains an array result to a specified size.
17
+ * Constrains an array result to a specified size.
18
18
  * @param inputRange The range to constrain.
19
19
  * @param numRows The number of rows the result should contain.
20
20
  * @param numCols The number of columns the result should contain.
21
21
  * @category Sheets
22
22
  */
23
- export declare function ARRAY_CONSTRAIN(inputRange: AcceptError<IRange>, numRows: number, numCols: number): IRange;
23
+ export declare function ARRAY_CONSTRAIN(inputRange: IRange, numRows: number, numCols: number): IRange;
24
24
  /**
25
- * @summary Enables the display of values returned from an array formula into multiple rows and/or columns.
25
+ * Enables the display of values returned from an array formula into multiple rows and/or columns.
26
26
  * @param arrayFormula A range, a mathematical expression over ranges of the same size, or a function that returns a result of more than one cell.
27
27
  * @category Sheets
28
28
  *
@@ -31,102 +31,95 @@ export declare function ARRAY_CONSTRAIN(inputRange: AcceptError<IRange>, numRows
31
31
  * into array evaluation.
32
32
  * Here every formula already evaluates as an array and spills, so there for pure sheet compatiblity.
33
33
  */
34
- export declare function ARRAYFORMULA(arrayFormula: AcceptError<IRange>): IRange;
34
+ export declare function ARRAYFORMULA(arrayFormula: IRange): IRange;
35
35
  /**
36
- * @summary Chooses a value or action to perform from a list of values, based on an index number.
36
+ * Chooses a value or action to perform from a list of values, based on an index number.
37
37
  * @param indexNum specifies which value argument is selected. Index_num must be between 1 and 254, or a formula or a reference to a number between 1 and 254.
38
38
  * @param value are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects.
39
39
  */
40
- export declare function CHOOSE(indexNum: number, value: AcceptError<any>[]): any;
40
+ export declare function CHOOSE(indexNum: number, value: Lazy<AcceptError<any>>[]): any;
41
41
  /**
42
- * @summary Returns columns from an array or reference.
42
+ * Returns columns from an array or reference.
43
43
  * @param array The array or reference from which to choose columns.
44
44
  * @param colNum The number of the column to be returned.
45
45
  */
46
- export declare function CHOOSECOLS(array: AcceptError<IRange>, colNum: number[]): IRange;
46
+ export declare function CHOOSECOLS(array: Flatten<IRange>, colNum: Repeating<number, 254>): IRange;
47
47
  /**
48
- * @summary Returns rows from an array or reference.
48
+ * Returns rows from an array or reference.
49
49
  * @param array The array or reference from which to choose rows.
50
50
  * @param rowNum The number of the row to be returned.
51
51
  */
52
- export declare function CHOOSEROWS(array: AcceptError<IRange>, rowNum: number[]): IRange;
52
+ export declare function CHOOSEROWS(array: Flatten<IRange>, rowNum: Repeating<number, 254>): IRange;
53
53
  /**
54
- * @summary Returns the column number of a reference.
54
+ * Returns the column number of a reference.
55
55
  * @param reference is the cell or range of contiguous cells for which you want the column number. If omitted, the cell containing the COLUMN function is used.
56
56
  */
57
- export declare function COLUMN(reference?: AcceptError<IReferenceRange>): number[];
57
+ export declare function COLUMN(reference?: Flatten<IReferenceRange>): number[];
58
58
  /**
59
- * @summary Returns the number of columns in an array or reference.
59
+ * Returns the number of columns in an array or reference.
60
60
  * @param array is an array or array formula, or a reference to a range of cells for which you want the number of columns.
61
61
  */
62
- export declare function COLUMNS(array: AcceptRefError<IRange>): number;
62
+ export declare function COLUMNS(array: Flatten<IRange>): number | FormulaError.Known;
63
63
  /**
64
- * @summary Drops rows or columns from array start or end.
64
+ * Drops rows or columns from array start or end.
65
65
  * @param array The array from which to drop rows or columns.
66
66
  * @param row The number of rows to drop. A negative value drops from the end of the array.
67
67
  * @param columns The number of columns to drop. A negative value drops from the end of the array.
68
68
  */
69
- export declare function DROP(array: AcceptRefError<IRange>, row: number, columns?: Omittable<number>): IRange;
70
- /**
71
- * @summary Expands an array to the specified dimensions.
72
- * @param array The array to expand.
73
- * @param row The number of rows in the expanded array. If missing, rows will not be expanded.
74
- * @param columns The number of columns in the expanded array. If missing, columns will not be expanded.
75
- * @param padWidth The value with which to pad. The default is #N/A.
76
- */
77
- export declare function EXPAND(array: AcceptError<IRange>, row: number, columns?: Omittable<number>, padWidth?: AcceptError<Scalar>): IRange;
69
+ export declare function DROP(array: IRange, row: number, columns?: Omittable<number>): IReferenceRange;
70
+ export declare function EXPAND(array: IRange | Scalar, row: Omittable<number>, columns?: Omittable<number>, padWith?: NoLift<Omittable<AcceptError<Scalar>>>): IRange;
78
71
  /**
72
+ * Extracts a value from a field of a given record.
79
73
  * @hidden Unimplemented RichData
80
- * @summary Extracts a value from a field of a given record.
81
74
  * @param value The record from which you want to extract the field.
82
75
  * @param fieldName The names of the field or fields that you want to extract.
83
76
  */
84
77
  export declare function FIELDVALUE(value: IRichData, fieldName: string): Scalar[][];
85
78
  /**
86
- * @summary Filter a range or array.
79
+ * Filter a range or array.
87
80
  * @param array the range or array to filter.
88
81
  * @param include an array of booleans where TRUE represents a row or column to retain.
89
82
  * @param ifEmpty return if no items are retained.
90
83
  */
91
- export declare function FILTER(array: AcceptError<IRange>, include: AcceptError<IRange<boolean>>, ifEmpty?: AcceptError<IRange>): IRange;
84
+ export declare function FILTER(array: Flatten<IRange>, include: Flatten<IRange<boolean>>, ifEmpty?: Omittable<AcceptError<IRange>>): IRange;
92
85
  /**
93
- * @summary Returns a formula as a string.
86
+ * Returns a formula as a string.
94
87
  * @param reference is a reference to a formula.
95
88
  */
96
- export declare function FORMULATEXT(reference: AcceptError<IReferenceRange>): string;
89
+ export declare function FORMULATEXT(reference: Flatten<IReferenceRange>): string;
97
90
  /**
91
+ * Extracts data stored in a PivotTable.
98
92
  * @hidden Unimplemented Pivot
99
- * @summary Extracts data stored in a PivotTable.
100
93
  * @param dataField is the name of the data field to extract data from.
101
94
  * @param pivotTable is a reference to a cell or range of cells in the PivotTable that contains the data you want to retrieve.
102
95
  * @param fieldItem the field/item pairs to refer to.
103
96
  * @param fieldItem.field field to refer to.
104
97
  * @param fieldItem.item field item to refer to.
105
98
  */
106
- export declare function GETPIVOTDATA(dataField: string, pivotTable: string, fieldItem?: Repeating<[field: string, item?: AcceptError<IRange>]>): string;
99
+ export declare function GETPIVOTDATA(dataField: string, pivotTable: string, fieldItem?: Repeating<[field: string, item?: IRange]>): string;
107
100
  /**
108
- * @summary Looks for a value in the top row of a table or array of values and returns the value in the same column from a row you specify.
101
+ * Looks for a value in the top row of a table or array of values and returns the value in the same column from a row you specify.
109
102
  * @param lookupValue is the value to be found in the first row of the table and can be a value, a reference, or a text string.
110
103
  * @param tableArray is a table of text, numbers, or logical values in which data is looked up. tableArray can be a reference to a range or a range name.
111
104
  * @param rowIndexNum is the row number in tableArray from which the matching value should be returned. The first row of values in the table is row 1.
112
105
  * @param rangeLookup is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE; find an exact match = FALSE.
113
106
  */
114
- export declare function HLOOKUP(lookupValue: Scalar, tableArray: AcceptRefError<IRange>, rowIndexNum: number, rangeLookup?: boolean): Scalar;
107
+ export declare function HLOOKUP(lookupValue: Scalar, tableArray: Flatten<IRange>, rowIndexNum: number, rangeLookup?: boolean): Scalar;
115
108
  /**
116
- * @summary Horizontally stacks arrays into one array.
109
+ * Horizontally stacks arrays into one array.
117
110
  * @param array An array or reference to be stacked.
118
111
  */
119
- export declare function HSTACK(array: AcceptError<IRange>[]): IRange;
112
+ export declare function HSTACK(array: Repeating<IRange, 254>): IRange;
120
113
  /**
114
+ * Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet.
121
115
  * @hidden Unimplemented RichData
122
- * @summary Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet.
123
116
  * @param linkLocation is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path.
124
117
  * @param friendlyName is text or a number that is displayed in the cell. If omitted, the cell displays the linkLocation text.
125
118
  */
126
119
  export declare function HYPERLINK(linkLocation: string, friendlyName?: string): Scalar;
127
120
  /**
121
+ * Returns an image from a given source.
128
122
  * @hidden Unimplemented RichData
129
- * @summary Returns an image from a given source.
130
123
  * @param source The path of the source that points to the image.
131
124
  * @param alternateText The alternative text that describes the image for accessibility.
132
125
  * @param sizing The setting that determines the dimensions in which the image will be rendered in the cell.
@@ -135,7 +128,7 @@ export declare function HYPERLINK(linkLocation: string, friendlyName?: string):
135
128
  */
136
129
  export declare function IMAGE(source: string, alternateText?: string, sizing?: number, height?: number, width?: number): IRichData;
137
130
  /**
138
- * @summary Returns a value or reference of the cell at the intersection of a particular row and column, in a given range.
131
+ * Returns a value or reference of the cell at the intersection of a particular row and column, in a given range.
139
132
  * @param array is a range of cells or an array constant.
140
133
  * @param rowNum selects the row in Array or Reference from which to return a value. If omitted, colNum is required.
141
134
  * @param colNum selects the column in Array or Reference from which to return a value. If omitted, rowNum is required.
@@ -144,139 +137,271 @@ export declare function IMAGE(source: string, alternateText?: string, sizing?: n
144
137
  * @remarks
145
138
  * Combines both Excel INDEX functions using optional parameters.
146
139
  */
147
- export declare function INDEX(array: Flatten<AcceptError<IRange>>, rowNum: Omittable<number>, colNum?: Omittable<number>, areaNum?: Omittable<number, 0>): any;
140
+ export declare function INDEX(array: Flatten<IRange>, rowNum: Omittable<number>, colNum?: Omittable<number | undefined, 0>, areaNum?: Omittable<number, 0>): any;
148
141
  /**
149
- * @summary Returns the reference specified by a text string.
142
+ * Returns the reference specified by a text string.
150
143
  * @param refText is a reference to a cell that contains an A1- or R1C1-style reference, a name defined as a reference, or a reference to a cell as a text string.
151
144
  * @param a1 is a logical value that specifies the type of reference in refText: R1C1-style = FALSE; A1-style = TRUE.
152
145
  */
153
146
  export declare function INDIRECT(refText: string, a1?: boolean): IReferenceRange;
154
147
  /**
155
- * @summary Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility.
148
+ * Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility.
156
149
  * @param lookupValue is a value that LOOKUP searches for in lookupVector and can be a number, text, a logical value, or a name or reference to a value.
157
150
  * @param lookupVector is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order.
158
151
  * @param resultVector is a range that contains only one row or column, the same size as lookupVector.
159
152
  */
160
- export declare function LOOKUP(lookupValue: Scalar, lookupVector: AcceptRefError<IRange>, resultVector?: Omittable<AcceptError<IRange> | null, null>): Scalar;
153
+ export declare function LOOKUP(lookupValue: Scalar, lookupVector: Flatten<IRange>, resultVector?: Omittable<IRange | null, null>): Scalar;
161
154
  /**
162
- * @summary Returns the relative position of an item in an array that matches a specified value in a specified order.
155
+ * How MATCH compares the lookup value with the values in the array.
156
+ *
157
+ * @remarks
158
+ * Declared `ReportType`, as every numeric built-in enum is: the body keeps the verdict. It reads the
159
+ * argument by its SIGN; what Excel does with a value outside the set is not measured.
160
+ */
161
+ declare enum MatchType {
162
+ /**
163
+ * The largest value that is less than or equal to the lookup value. The array must be sorted in ascending order.
164
+ * @name Less than
165
+ */
166
+ LessThan = 1,
167
+ /**
168
+ * The first value that is exactly equal to the lookup value. The array can be in any order.
169
+ * @name Exact match
170
+ */
171
+ Exact = 0,
172
+ /**
173
+ * The smallest value that is greater than or equal to the lookup value. The array must be sorted in descending order.
174
+ * @name Greater than
175
+ */
176
+ GreaterThan = -1
177
+ }
178
+ /**
179
+ * Returns the relative position of an item in an array that matches a specified value in a specified order.
163
180
  * @param lookupValue is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these.
164
181
  * @param lookupArray is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array.
165
182
  * @param matchType is a number 1, 0, or -1 indicating which value to return.
166
183
  */
167
- export declare function MATCH(lookupValue: AcceptError<IRange>, lookupArray: AcceptRefError<IRange>, matchType?: Omittable<number, 0>): Scalar;
184
+ export declare function MATCH(lookupValue: Scalar, lookupArray: Flatten<IRange>, matchType?: Omittable<ReportType<MatchType>, 0>): Scalar;
168
185
  /**
169
- * @summary Returns a reference to a range that is a given number of rows and columns from a given reference.
186
+ * Returns a reference to a range that is a given number of rows and columns from a given reference.
170
187
  * @param reference is the reference from which you want to base the offset, a reference to a cell or range of adjacent cells.
171
188
  * @param rows is the number of rows, up or down, that you want the upper-left cell of the result to refer to.
172
189
  * @param cols is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to.
173
190
  * @param height is the height, in number of rows, that you want the result to be, the same height as Reference if omitted.
174
191
  * @param width is the width, in number of columns, that you want the result to be, the same width as Reference if omitted.
175
192
  */
176
- export declare function OFFSET(reference: AcceptError<IReferenceRange>, rows: number, cols: number, height?: Omittable<number>, width?: Omittable<number>): IReferenceRange;
193
+ export declare function OFFSET(reference: IReferenceRange, rows: number, cols: number, height?: Omittable<number>, width?: Omittable<number>): IReferenceRange;
177
194
  /**
178
- * @summary Returns the row number of a reference.
195
+ * Returns the row number of a reference.
179
196
  * @param reference is the cell or a single range of cells for which you want the row number; if omitted, returns the cell containing the ROW function.
197
+ * @returnKind number
180
198
  */
181
- export declare function ROW(reference?: AcceptError<IReferenceRange>): number[] | number[][];
199
+ export declare function ROW(reference?: Flatten<IReferenceRange>): number[] | number[][];
182
200
  /**
183
- * @summary Returns the number of rows in a reference or array.
201
+ * Returns the number of rows in a reference or array.
184
202
  * @param array is an array, an array formula, or a reference to a range of cells for which you want the number of rows.
185
203
  */
186
- export declare function ROWS(array: AcceptRefError<IRange>): number;
204
+ export declare function ROWS(array: Flatten<IRange>): number | FormulaError.Known;
187
205
  /**
206
+ * Retrieves the real-time data (RTD) from a program that supports COM automation.
188
207
  * @hidden Unimplemented Connectivity
189
- * @summary Retrieves the real-time data (RTD) from a program that supports COM automation.
190
208
  * @param progId is the programmatic identifier (ProgID) of a registered COM automation add-in. Enclose the id in quotation marks.
191
209
  * @param server is the name of the server that provides the real-time data. If running locally us an empty string.
192
210
  * @param topic are 1 to 38 parameters that specify a piece of data.
193
211
  */
194
212
  export declare function RTD(progId: string, server: string, topic: string[]): Scalar;
195
213
  /**
196
- * @summary Sorts a range or array.
214
+ * Sorts a range or array.
197
215
  * @param array the range or array to sort.
198
216
  * @param sortIndex a number indicating the row or column to sort by.
199
217
  * @param sortOrder a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.
200
218
  * @param byCol a logical value indicating the desired sort direction: FALSE to sort by row (default), TRUE to sort by column.
201
219
  */
202
- export declare function SORT(array: AcceptError<IRange>, sortIndex?: Omittable<Flatten<number>>, sortOrder?: Omittable<Flatten<number>>, byCol?: boolean): IRange;
220
+ export declare function SORT(array: IRange | Scalar, sortIndex?: Omittable<IRange>, sortOrder?: Omittable<IRange<ReportType<SortOrder>>>, byCol?: boolean): IRange;
203
221
  /**
204
- * @summary Sorts a range or array based on the values in a corresponding range or array.
222
+ * The direction SORT and SORTBY sort a key in.
223
+ *
224
+ * @remarks
225
+ * Declared `ReportType`, as every numeric built-in enum is: Excel FLOORS this argument (`1.5` sorts
226
+ * ascending, `-1.5` is #VALUE!), which an enum's gate does not, so `_sortOrders` keeps the verdict.
227
+ * SORT takes an array of orders, one per key, so its slot is `IRange<ReportType<SortOrder>>`.
228
+ */
229
+ declare enum SortOrder {
230
+ /**
231
+ * Smallest to largest.
232
+ * @name Ascending
233
+ */
234
+ Ascending = 1,
235
+ /**
236
+ * Largest to smallest.
237
+ * @name Descending
238
+ */
239
+ Descending = -1
240
+ }
241
+ /**
242
+ * Sorts a range or array based on the values in a corresponding range or array.
205
243
  * @param array the range or array to sort.
206
244
  * @param by the ranges to sort on and the direction for each.
207
245
  * @param by.byArray the range or array to sort on.
208
246
  * @param by.sortOrder a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.
209
247
  */
210
- export declare function SORTBY(array: AcceptError<IRange>, by: Repeating<[byArray: AcceptRefError<IRange>, sortOrder?: Omittable<number>]>): IRange;
248
+ export declare function SORTBY(array: IRange | Scalar, by: Repeating<[byArray: IRange, sortOrder?: Omittable<ReportType<SortOrder>>], 254>): IRange;
211
249
  /**
212
- * @summary Returns rows or columns from array start or end.
250
+ * Returns rows or columns from array start or end.
213
251
  * @param array The array from which to take rows or columns.
214
252
  * @param rows The number of rows to take. A negative value takes from the end of the array.
215
253
  * @param columns The number of columns to take. A negative value takes from the end of the array.
216
254
  */
217
- export declare function TAKE(array: AcceptError<IRange>, rows: number, columns?: number): IRange;
255
+ export declare function TAKE(array: IRange, rows: Omittable<number>, columns?: Omittable<number>): IReferenceRange;
218
256
  /**
219
- * @summary Returns the array as one column.
257
+ * Which values to leave out.
258
+ *
259
+ * @remarks
260
+ * Declared `ReportType`: Excel TRUNCATES this argument on the way in (`TOCOL(a,1.9)` reads 1 and
261
+ * `3.9` reads 3, measured), which an enum's gate does not, so the body keeps the verdict.
262
+ */
263
+ declare enum IgnoreValues {
264
+ /**
265
+ * Keep every value, blanks and errors included.
266
+ * @name Keep all values
267
+ */
268
+ KeepAll = 0,
269
+ /**
270
+ * Leave out blank cells.
271
+ * @name Ignore blanks
272
+ */
273
+ Blanks = 1,
274
+ /**
275
+ * Leave out error values.
276
+ * @name Ignore errors
277
+ */
278
+ Errors = 2,
279
+ /**
280
+ * Leave out blank cells and error values.
281
+ * @name Ignore blanks and errors
282
+ */
283
+ BlanksAndErrors = 3
284
+ }
285
+ /**
286
+ * Returns the array as one column.
220
287
  * @param array The array or reference to return as a column.
221
- * @param {'0 - Keep all values' | '1 - Ignore Blanks' | '2 - Ignore Errors' | '3 - Ignore Blanks and Errors'} ignore Whether to ignore certain types of values. By default, no values are ignored.
288
+ * @param ignore Whether to ignore certain types of values. By default, no values are ignored.
222
289
  * @param scanByColumn Scan the array by column. By default, the array is scanned by row.
223
290
  */
224
- export declare function TOCOL(array: AcceptError<IRange>, ignore?: number, scanByColumn?: boolean): IRange;
291
+ export declare function TOCOL(array: Flatten<IRange>, ignore?: ReportType<IgnoreValues>, scanByColumn?: boolean): IRange;
225
292
  /**
226
- * @summary Returns the array as one row.
293
+ * Returns the array as one row.
227
294
  * @param array The array or reference to return as a row.
228
- * @param {'0 - Keep all values' | '1 - Ignore Blanks' | '2 - Ignore Errors' | '3 - Ignore Blanks and Errors'} ignore Whether to ignore certain types of values. By default, no values are ignored.
295
+ * @param ignore Whether to ignore certain types of values. By default, no values are ignored.
229
296
  * @param scanByColumn Scan the array by column. By default, the array is scanned by row.
230
297
  */
231
- export declare function TOROW(array: AcceptError<IRange>, ignore?: number, scanByColumn?: boolean): IRange;
298
+ export declare function TOROW(array: Flatten<IRange>, ignore?: ReportType<IgnoreValues>, scanByColumn?: boolean): IRange;
232
299
  /**
233
- * @summary Converts a vertical range of cells to a horizontal range, or vice versa.
300
+ * Converts a vertical range of cells to a horizontal range, or vice versa.
234
301
  * @param array is a range of cells on a worksheet or an array of values that you want to transpose.
235
302
  */
236
- export declare function TRANSPOSE(array: AcceptError<IRange>): IRange;
303
+ export declare function TRANSPOSE(array: IRange): IRange;
237
304
  /**
238
- * @summary Trims a range to the last used cell in any direction.
305
+ * Trims a range to the last used cell in any direction.
239
306
  * @param range The range to be trimmed.
240
307
  * @param rowTrimMode Row trim direction. 0 - none, 1 - leading, 2 - trailing, 3 - both.
241
308
  * @param colTrimMode Column trim direction. 0 - none. 1 - leading, 2 - trailing, 3 - both.
242
309
  */
243
- export declare function TRIMRANGE(range: AcceptError<IRange>, rowTrimMode?: Omittable<number>, colTrimMode?: Omittable<number>): IRange;
310
+ export declare function TRIMRANGE(range: IRange, rowTrimMode?: Omittable<number>, colTrimMode?: Omittable<number>): IReferenceRange;
244
311
  /**
245
- * @summary Returns the unique values from a range or array.
312
+ * Returns the unique values from a range or array.
246
313
  * @param array the range or array from which to return unique rows or columns.
247
314
  * @param byCol is a logical value: compare rows against each other and return the unique rows = FALSE; compare columns against each other and return the unique columns = TRUE.
248
315
  * @param exactlyOnce is a logical value: return rows or columns that occur exactly once from the array = TRUE; return all distinct rows or columns from the array = FALSE.
249
316
  */
250
- export declare function UNIQUE(array: AcceptError<IRange>, byCol?: boolean, exactlyOnce?: boolean): IRange;
317
+ export declare function UNIQUE(array: IRange | Scalar, byCol?: boolean, exactlyOnce?: boolean): IRange;
251
318
  /**
252
- * @summary Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order.
319
+ * Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order.
253
320
  * @param lookupValue is the value to be found in the first column of the table, and can be a value, a reference, or a text string.
254
321
  * @param tableArray is a table of text, numbers, or logical values, in which data is retrieved. tableArray can be a reference to a range or a range name.
255
322
  * @param colIndexNum is the column number in tableArray from which the matching value should be returned. The first column of values in the table is column 1.
256
323
  * @param rangeLookup is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE; find an exact match = FALSE.
257
324
  */
258
- export declare function VLOOKUP(lookupValue: Scalar, tableArray: AcceptRefError<IRange>, colIndexNum: number, rangeLookup?: boolean): Scalar;
325
+ export declare function VLOOKUP(lookupValue: Scalar, tableArray: Flatten<IRange>, colIndexNum: number, rangeLookup?: boolean): Scalar;
259
326
  /**
260
- * @summary Vertically stacks arrays into one array.
327
+ * Vertically stacks arrays into one array.
261
328
  * @param array An array or reference to be stacked.
262
329
  */
263
- export declare function VSTACK(array: AcceptError<IRange>[]): IRange;
330
+ export declare function VSTACK(array: Repeating<IRange, 254>): IRange;
264
331
  /**
265
- * @summary Wraps a row or column vector after a specified number of values.
332
+ * Wraps a row or column vector after a specified number of values.
266
333
  * @param vector The vector or reference to wrap.
267
334
  * @param wrapCount The maximum number of values per column.
268
335
  * @param padWith The value with which to pad. The default is #N/A.
269
336
  */
270
- export declare function WRAPCOLS(vector: AcceptError<IRange>, wrapCount: number, padWith?: Omittable<AcceptError<Scalar>>): IRange;
337
+ export declare function WRAPCOLS(vector: IRange | Scalar, wrapCount: number, padWith?: Omittable<AcceptError<Scalar>>): IRange;
271
338
  /**
272
- * @summary Wraps a row or column vector after a specified number of values.
339
+ * Wraps a row or column vector after a specified number of values.
273
340
  * @param vector The vector or reference to wrap.
274
341
  * @param wrapCount The maximum number of values per row.
275
342
  * @param padWith The value with which to pad. The default is #N/A.
276
343
  */
277
- export declare function WRAPROWS(vector: AcceptError<IRange>, wrapCount: number, padWith?: Omittable<AcceptError<Scalar>>): IRange;
344
+ export declare function WRAPROWS(vector: IRange | Scalar, wrapCount: number, padWith?: Omittable<AcceptError<Scalar>>): IRange;
278
345
  /**
279
- * @summary Searches a range or an array for a match and returns the corresponding item from a second range or array. By default, an exact match is used.
346
+ * How XLOOKUP and XMATCH match the lookup value.
347
+ *
348
+ * @remarks
349
+ * Declared `ReportType`, as every numeric built-in enum is: the body keeps the verdict (anything
350
+ * else is #VALUE!). Excel's out-of-set behavior is not measured.
351
+ */
352
+ declare enum MatchMode {
353
+ /**
354
+ * Only an item equal to the lookup value.
355
+ * @name Exact match
356
+ */
357
+ Exact = 0,
358
+ /**
359
+ * An item equal to the lookup value, or else the next smaller item.
360
+ * @name Exact match or next smaller item
361
+ */
362
+ ExactOrSmaller = -1,
363
+ /**
364
+ * An item equal to the lookup value, or else the next larger item.
365
+ * @name Exact match or next larger item
366
+ */
367
+ ExactOrLarger = 1,
368
+ /**
369
+ * The lookup value may use *, ? and ~ as wildcards.
370
+ * @name Wildcard character match
371
+ */
372
+ Wildcard = 2
373
+ }
374
+ /**
375
+ * The order in which XLOOKUP and XMATCH search.
376
+ *
377
+ * @remarks
378
+ * Declared `ReportType`, as every numeric built-in enum is: the body keeps the verdict (anything
379
+ * else is #VALUE!). Excel's out-of-set behavior is not measured.
380
+ */
381
+ declare enum SearchMode {
382
+ /**
383
+ * Search from the first item to the last.
384
+ * @name Search first-to-last
385
+ */
386
+ FirstToLast = 1,
387
+ /**
388
+ * Search from the last item to the first.
389
+ * @name Search last-to-first
390
+ */
391
+ LastToFirst = -1,
392
+ /**
393
+ * A binary search of items sorted in ascending order.
394
+ * @name Binary search (sorted ascending order)
395
+ */
396
+ BinaryAscending = 2,
397
+ /**
398
+ * A binary search of items sorted in descending order.
399
+ * @name Binary search (sorted descending order)
400
+ */
401
+ BinaryDescending = -2
402
+ }
403
+ /**
404
+ * Searches a range or an array for a match and returns the corresponding item from a second range or array. By default, an exact match is used.
280
405
  * @param lookupValue is the value to search for.
281
406
  * @param lookupArray is the array or range to search.
282
407
  * @param returnArray is the array or range to return.
@@ -284,13 +409,14 @@ export declare function WRAPROWS(vector: AcceptError<IRange>, wrapCount: number,
284
409
  * @param matchMode 0=exact (default), -1=exact/next-smaller, 1=exact/next-larger, 2=wildcard
285
410
  * @param searchMode 1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc
286
411
  */
287
- export declare function XLOOKUP(lookupValue: AcceptError<IRange>, lookupArray: AcceptRefError<IRange>, returnArray: AcceptError<IRange>, ifNotFound?: Omittable<AcceptError<Scalar>>, matchMode?: number, searchMode?: Omittable<number>): IReferenceRange;
412
+ export declare function XLOOKUP(lookupValue: Scalar, lookupArray: Flatten<IRange>, returnArray: Flatten<IRange>, ifNotFound?: Omittable<AcceptError<Scalar>>, matchMode?: ReportType<MatchMode>, searchMode?: Omittable<ReportType<SearchMode>>): IReferenceRange;
288
413
  /**
289
- * @summary Returns the relative position of an item in an array. By default, an exact match is required.
414
+ * Returns the relative position of an item in an array. By default, an exact match is required.
290
415
  * @param lookupValue is the value to search for.
291
416
  * @param lookupArray is the array or range to search.
292
417
  * @param matchMode 0=exact (default), -1=exact/next-smaller, 1=exact/next-larger, 2=wildcard
293
418
  * @param searchMode 1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc
294
419
  */
295
- export declare function XMATCH(lookupValue: AcceptError<IRange>, lookupArray: AcceptRefError<IRange>, matchMode?: number, searchMode?: Omittable<number>): Scalar;
420
+ export declare function XMATCH(lookupValue: Scalar, lookupArray: Flatten<IRange>, matchMode?: ReportType<MatchMode>, searchMode?: Omittable<ReportType<SearchMode>>): Scalar;
421
+ export {};
296
422
  //# sourceMappingURL=Reference.d.ts.map