@rowsncolumns/toolkit 24.5.18 → 24.5.19
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/dist/cjs/excel-parser/defined-names.d.ts +18 -0
- package/dist/cjs/excel-parser/defined-names.d.ts.map +1 -0
- package/dist/cjs/excel-parser/defined-names.js +59 -0
- package/dist/cjs/excel-parser/interface.d.ts +7 -1
- package/dist/cjs/excel-parser/interface.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsb/function-table.d.ts +17 -0
- package/dist/cjs/excel-parser/plugins/xlsb/function-table.d.ts.map +1 -0
- package/dist/cjs/excel-parser/plugins/xlsb/function-table.js +988 -0
- package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts +45 -3
- package/dist/cjs/excel-parser/plugins/xlsb/index.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsb/index.js +406 -374
- package/dist/cjs/excel-parser/plugins/xlsb/rgce-parser.d.ts +43 -9
- package/dist/cjs/excel-parser/plugins/xlsb/rgce-parser.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsb/rgce-parser.js +422 -478
- package/dist/cjs/excel-parser/plugins/xlsx/index.d.ts.map +1 -1
- package/dist/cjs/excel-parser/plugins/xlsx/index.js +147 -191
- package/dist/cjs/excel-parser/types.d.ts +17 -0
- package/dist/cjs/excel-parser/types.d.ts.map +1 -1
- package/dist/cjs/excel-parser/workbook.d.ts +1 -0
- package/dist/cjs/excel-parser/workbook.d.ts.map +1 -1
- package/dist/cjs/excel-parser/workbook.js +4 -0
- package/dist/cjs/exporter/xlsx/xlsx-export.d.ts.map +1 -1
- package/dist/cjs/exporter/xlsx/xlsx-export.js +41 -20
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/excel-parser/defined-names.d.ts +18 -0
- package/dist/esm/excel-parser/defined-names.d.ts.map +1 -0
- package/dist/esm/excel-parser/defined-names.js +67 -0
- package/dist/esm/excel-parser/interface.d.ts +7 -1
- package/dist/esm/excel-parser/interface.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsb/function-table.d.ts +17 -0
- package/dist/esm/excel-parser/plugins/xlsb/function-table.d.ts.map +1 -0
- package/dist/esm/excel-parser/plugins/xlsb/function-table.js +988 -0
- package/dist/esm/excel-parser/plugins/xlsb/index.d.ts +45 -3
- package/dist/esm/excel-parser/plugins/xlsb/index.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsb/index.js +266 -205
- package/dist/esm/excel-parser/plugins/xlsb/rgce-parser.d.ts +43 -9
- package/dist/esm/excel-parser/plugins/xlsb/rgce-parser.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsb/rgce-parser.js +405 -472
- package/dist/esm/excel-parser/plugins/xlsx/index.d.ts.map +1 -1
- package/dist/esm/excel-parser/plugins/xlsx/index.js +9 -58
- package/dist/esm/excel-parser/types.d.ts +17 -0
- package/dist/esm/excel-parser/types.d.ts.map +1 -1
- package/dist/esm/excel-parser/workbook.d.ts +1 -0
- package/dist/esm/excel-parser/workbook.d.ts.map +1 -1
- package/dist/esm/excel-parser/workbook.js +3 -0
- package/dist/esm/exporter/xlsx/xlsx-export.d.ts.map +1 -1
- package/dist/esm/exporter/xlsx/xlsx-export.js +22 -3
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Decoder for a BIFF12 formula's token stream (`rgce`, [MS-XLSB] 2.2.2 / 2.5.97.88):
|
|
3
|
+
* reverse-Polish tokens rebuilt into the formula's text.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Strict by design: a formula decodes completely or not at all. A token it
|
|
6
|
+
* does not know, a function outside the table, a read past the end of the
|
|
7
|
+
* stream or a stack that does not end with exactly one expression throws
|
|
8
|
+
* {@link RgceUnsupportedError}, and the caller keeps the cell's cached value
|
|
9
|
+
* instead of writing a formula that computes something else.
|
|
7
10
|
*/
|
|
11
|
+
/** The formula cannot be decoded exactly; keep the cell's cached value. */
|
|
12
|
+
export declare class RgceUnsupportedError extends Error {
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
15
|
+
export type RgceContext = {
|
|
16
|
+
/** The sheet an XTI index names (`PtgRef3d`/`PtgArea3d`); `undefined` when unknown. */
|
|
17
|
+
sheetName?: (ixti: number) => string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The name a 1-based `PtgName` index refers to, already qualified with its
|
|
20
|
+
* sheet when the formula's sheet must say which one (`Sheet2!Local`).
|
|
21
|
+
*/
|
|
22
|
+
definedName?: (index: number) => string | undefined;
|
|
23
|
+
/** The cell relative references (`PtgRefN`/`PtgAreaN`) are relative to, 1-based. */
|
|
24
|
+
baseCell?: {
|
|
25
|
+
row: number;
|
|
26
|
+
col: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
8
29
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
30
|
+
* A sheet name as a reference prefix: quoted unless it is a plain ASCII
|
|
31
|
+
* identifier no reader could take for a cell (`A1`, `R1C1`, `R`) or a
|
|
32
|
+
* boolean. Quoting is always valid, so anything else is quoted.
|
|
33
|
+
*/
|
|
34
|
+
export declare const quoteSheetName: (name: string) => string;
|
|
35
|
+
/**
|
|
36
|
+
* Decode a formula's tokens into its text, without the leading `=`.
|
|
37
|
+
*
|
|
38
|
+
* Throws {@link RgceUnsupportedError} when any part of the formula cannot be
|
|
39
|
+
* decoded exactly.
|
|
40
|
+
*/
|
|
41
|
+
export declare function decodeRgce(rgce: Uint8Array, context?: RgceContext): string;
|
|
42
|
+
/**
|
|
43
|
+
* A formula's text, or `""` when it cannot be decoded exactly — never a part of
|
|
44
|
+
* one. Prefer {@link decodeRgce}, which says why.
|
|
45
|
+
*
|
|
46
|
+
* @deprecated the lenient form of {@link decodeRgce}.
|
|
13
47
|
*/
|
|
14
48
|
export declare function parseRgce(rgceBytes: Uint8Array, sheetRefResolver?: string[] | ((ixti: number) => string | undefined), baseCell?: {
|
|
15
49
|
row: number;
|
|
16
50
|
col: number;
|
|
17
|
-
}
|
|
51
|
+
}): string;
|
|
18
52
|
//# sourceMappingURL=rgce-parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rgce-parser.d.ts","sourceRoot":"","sources":["../../../../../excel-parser/plugins/xlsb/rgce-parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rgce-parser.d.ts","sourceRoot":"","sources":["../../../../../excel-parser/plugins/xlsb/rgce-parser.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,2EAA2E;AAC3E,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,uFAAuF;IACvF,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACjD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACpD,oFAAoF;IACpF,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC,CAAC;AA+FF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,MAMT,CAAC;AA2DtC;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,WAAgB,GAAG,MAAM,CAoR9E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,UAAU,EACrB,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,EACpE,QAAQ,CAAC,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACtC,MAAM,CAYR"}
|