@sheetxl/io-xlsx 0.8.0-beta.12 → 0.8.0-beta.13
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/browser/esm/{DO75RoAQTgMuVzXv.mjs → 20e8E-6B9lZDdDO3.mjs} +2 -2
- package/browser/esm/{DKnOwucZq4z9_-r-.mjs → B4_m1DDdERBw_oc_.mjs} +4 -4
- package/browser/esm/{DsppUz-14Z7ti9i3.mjs → B8HGBRlYw3gtV6cS.mjs} +1 -1
- package/browser/esm/{aUBXbTh2r0u3x4Xo.mjs → BUnVDknxJ3z7Byym.mjs} +2 -2
- package/browser/esm/{D8k22TSWPd_RHEpj.mjs → BZULU4MreyJ0WsDY.mjs} +988 -1008
- package/browser/esm/{9dwUocbOsJuAcmKn.mjs → BduVw3dFdh9sSGv_.mjs} +2234 -2250
- package/browser/esm/CM4k1dv3DNPThvDz.mjs +24 -0
- package/browser/esm/{BIvDjK4Zl8bWRgl8.mjs → CkEGcTzeyh7cqVVb.mjs} +2 -2
- package/browser/esm/{DVLJTjJCGqrJUa8c.mjs → DmW0VCJFl3eX7pBV.mjs} +61 -61
- package/browser/esm/{CcH5ITJFTMVWUJO9.mjs → eFR-PmxEV53J-933.mjs} +1041 -1041
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DeMZN_qj__PKo4Wh.mjs → khCH6SyDFBiHzmSl.mjs} +1 -1
- package/node/esm/{DXusvwW73FUDSyvD.mjs → BqB-dnUZaszNS--K.mjs} +1129 -1129
- package/node/esm/{CDKm5s3JE_d99TJw.mjs → ByC9KtkF09muIv1I.mjs} +81 -81
- package/node/esm/{DCaAOfuW-w_dx_qd.mjs → CHElwgFJ32Hh_gHU.mjs} +2 -2
- package/node/esm/{DSgxL0sBZtWMydVl.mjs → CIpg0EBGoVM58ajd.mjs} +2 -2
- package/node/esm/{C78E45n6j2E8rruH.mjs → CJt_Kh2EU8DlMcus.mjs} +818 -819
- package/node/esm/{DsyuWxk3bdGhJUQN.mjs → COzTSkHGuyKdKaxO.mjs} +1 -1
- package/node/esm/{BmIIQODk4dBVIXA4.mjs → Cc4XXs0Y2lL-2Et9.mjs} +976 -994
- package/node/esm/{C-e5AO_4TnGywT-m.mjs → DmvVllQAwUtHEJbX.mjs} +1 -1
- package/node/esm/index.mjs +4 -4
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +0 -42
- package/types/src/DataTableFormula.d.ts +0 -10
- package/types/src/DataValidationRules.d.ts +0 -5
- package/types/src/ExcelCalcStamp.d.ts +0 -36
- package/types/src/ExcelCompat.d.ts +0 -140
- package/types/src/ExcelFunctionFacts.d.ts +0 -272
- package/types/src/ExcelReservedNames.d.ts +0 -64
- package/types/src/KnownFonts.d.ts +0 -13
- package/types/src/LegacyFormula.d.ts +0 -58
- package/types/src/Plugin.d.ts +3 -3
- package/types/src/SheetKinds.d.ts +0 -15
- package/types/src/SourcePackage.d.ts +0 -44
- package/types/src/Types.d.ts +2 -3
- package/types/src/chart/_chartExStyle.d.ts +0 -9
- package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +0 -10
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +0 -9
- package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +0 -15
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +3 -1
- package/types/src/richValue/WebImageRichValueHandler.d.ts +0 -5
- package/types/src/utils/VmlNoteStyle.d.ts +0 -19
- package/types/src/vba/VBAProject.d.ts +0 -19
- package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
- package/types/src/writer/builder/PackageBuilder.d.ts +0 -41
- package/types/src/writer/builder/Types.d.ts +0 -30
- package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +0 -10
- package/types/src/writer/utils/DefaultRows.d.ts +0 -16
- package/types/src/writer/utils/DummyFunction.d.ts +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -14,7 +14,7 @@ var a = [
|
|
|
14
14
|
177,
|
|
15
15
|
26,
|
|
16
16
|
225
|
|
17
|
-
], t = async () => (await import("./
|
|
17
|
+
], t = async () => (await import("./CHElwgFJ32Hh_gHU.mjs")).OffCryptoEncryption, r = {
|
|
18
18
|
key: "offcrypto",
|
|
19
19
|
description: "Office Document Encryption",
|
|
20
20
|
detect: async (e) => !!((e) => {
|
|
@@ -25,7 +25,7 @@ var a = [
|
|
|
25
25
|
})(e) && (await t()).detect(e),
|
|
26
26
|
decode: async (e, a) => (await t()).decode(e, a),
|
|
27
27
|
encode: async (e, a) => (await t()).encode(e, a)
|
|
28
|
-
}, i = e("io-xlsx:reader", () => import("./
|
|
28
|
+
}, i = e("io-xlsx:reader", () => import("./Cc4XXs0Y2lL-2Et9.mjs").then((e) => e.t)), o = e("io-xlsx:writer", () => import("./BqB-dnUZaszNS--K.mjs")), l = "Excel", n = "ExcelMacro", c = "ExcelTemplate", m = "ExcelMacroTemplate", s = [
|
|
29
29
|
l,
|
|
30
30
|
n,
|
|
31
31
|
c,
|
|
@@ -94,7 +94,7 @@ var a = [
|
|
|
94
94
|
})
|
|
95
95
|
}, X = {
|
|
96
96
|
name: "@sheetxl/io-xlsx",
|
|
97
|
-
version: "0.8.0-beta.
|
|
97
|
+
version: "0.8.0-beta.13",
|
|
98
98
|
description: "XLSX I/O formats for SheetXL",
|
|
99
99
|
author: "SheetXL",
|
|
100
100
|
async register(e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/io-xlsx",
|
|
3
3
|
"description": "SheetXL - Import/Export from/to Excel",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.13",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"utilities"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
48
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
47
|
+
"@sheetxl/sdk": "^0.8.0-beta.13",
|
|
48
|
+
"@sheetxl/utils": "^0.8.0-beta.13",
|
|
49
49
|
"@xmldom/xmldom": "^0.9.12",
|
|
50
50
|
"@zip.js/zip.js": "^2.23.0",
|
|
51
51
|
"web-streams-polyfill": "^4.3.0",
|
|
@@ -10,39 +10,6 @@ export declare const DYNAMIC_FILTER_PERIODS: ReadonlySet<string>;
|
|
|
10
10
|
* cache of its last evaluation, never read.
|
|
11
11
|
*/
|
|
12
12
|
export declare function dynamicFilterToJSON(type: string | null | undefined): ICondition.JSON;
|
|
13
|
-
/**
|
|
14
|
-
* The border between OOXML's `customFilter` and the SDK's condition.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* `customFilter` is the third of OOXML's three condition systems, and the only one that had no
|
|
18
|
-
* border of its own: the reader passed `@operator` straight through as an SDK operator name and
|
|
19
|
-
* the writer switched SDK names against OOXML spellings. The two vocabularies overlap on exactly
|
|
20
|
-
* `lessThan` and `greaterThan`, so those worked and the other four did not — `greaterThanOrEqual`
|
|
21
|
-
* arrived as an operator no registry knew, and left again as `equal`.
|
|
22
|
-
*
|
|
23
|
-
* Both directions live in one file, as they do for data validations and conditional formats: they
|
|
24
|
-
* are one table, and a mapping whose halves drift apart is the bug the round-trip corpus exists to
|
|
25
|
-
* catch.
|
|
26
|
-
*
|
|
27
|
-
* Excel has no text operators here. Its text filters are `equal` / `notEqual` over a pattern packed
|
|
28
|
-
* into `@val`: `abc*` begins with, `*abc` ends with, `*abc*` contains, and `~` before `*`, `?` or
|
|
29
|
-
* `~` makes that character literal. The three shapes map onto the SDK's text operators; any other
|
|
30
|
-
* pattern (`a*b`, `a?c`) has no operator and is carried under its OOXML spelling, inert, so a resave
|
|
31
|
-
* writes it back as it arrived.
|
|
32
|
-
*
|
|
33
|
-
* A wildcard-free `equal` compares the text a cell shows (P1, P5, P10): it reads as `equalTo`
|
|
34
|
-
* under the Display selector ("displays as") and `notEqual` as its negation; `equalTo` under no
|
|
35
|
-
* selector is value equality and never comes from here (DESIGN-FILTER §3.2, MODEL-CONDITIONS §4).
|
|
36
|
-
* Excel stores a plain `equal` as `<filters><filter val>` on save, and so does this writer, which
|
|
37
|
-
* is why it reopens as a one-item `inSet` under Display; the two are the same predicate. Excel's
|
|
38
|
-
* `<>` criterion is `notEqual` against one space (P7) and reads as `not(blank)` under Display,
|
|
39
|
-
* since a string of spaces is blank to it (§3.3). The selector sits on the leaf that reads the
|
|
40
|
-
* value: inside a `not`, on each child of a pair.
|
|
41
|
-
*
|
|
42
|
-
* Value equality has no `customFilter` spelling. A value `EqualTo` on a number goes out as Excel's
|
|
43
|
-
* own value test, `<customFilters and="1">` of `greaterThanOrEqual` and `lessThanOrEqual` with
|
|
44
|
-
* the same operand, which Excel evaluates live; {@link foldComparisonPair} reads it back.
|
|
45
|
-
*/
|
|
46
13
|
/** A `customFilter` in OOXML's own shape. Reader input, writer output — never persisted. */
|
|
47
14
|
export interface OOXMLCustomFilter {
|
|
48
15
|
operator?: string | null;
|
|
@@ -81,15 +48,6 @@ export declare function escapeWildcards(text: string): string;
|
|
|
81
48
|
* not read through here — they are a one-item values list, whose item is text.
|
|
82
49
|
*/
|
|
83
50
|
export declare function valToParam(val: string | null | undefined): string | number | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* A param or a values-list item as the text an attribute holds.
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* A typed value is written as `String(value)`, which is the text it shows only under `General`. A
|
|
89
|
-
* value list (`inSet` under no selector) written this way reopens as a display list and keeps a
|
|
90
|
-
* number under `0.00` only if it shows as `1.5`; the writer warns. (PLAN-FILTER Phase 4 spells a
|
|
91
|
-
* value list as the texts the value shows in its column.)
|
|
92
|
-
*/
|
|
93
51
|
export declare function paramToVal(param: unknown): string | undefined;
|
|
94
52
|
/**
|
|
95
53
|
* Reads a `customFilter` as a condition.
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { IRange } from '@sheetxl/sdk';
|
|
2
|
-
/**
|
|
3
|
-
* A what-if data table as a file states one: what Excel's `<f t="dataTable">` and LibreOffice's
|
|
4
|
-
* per-cell `TABLE(...)` both describe, and what `TABLE(rowInput, columnInput, rows, columns)` at the
|
|
5
|
-
* results' top-left says in the model (DESIGN-DATA-TABLES §4.5).
|
|
6
|
-
*/
|
|
7
2
|
export interface DataTableDefinition {
|
|
8
3
|
/** The result cells. */
|
|
9
4
|
ref: IRange.Coords;
|
|
@@ -27,10 +22,5 @@ export declare const toDataTableFormula: (table: DataTableDefinition) => string;
|
|
|
27
22
|
* @param anchor The cell the formula sits in: the results' top-left.
|
|
28
23
|
*/
|
|
29
24
|
export declare const parseDataTableFormula: (text: string, anchor: IRange.CellCoords) => DataTableDefinition | null;
|
|
30
|
-
/**
|
|
31
|
-
* Excel's `<f t="dataTable">` attributes for a definition, in Excel's order. `r1` is the row input
|
|
32
|
-
* of a two-input table, else the one input, with `dtr` saying which; Excel writes `dt2D` and `dtr`
|
|
33
|
-
* both ways. A deleted input is `del1`/`del2` with no address (probe P8, PLAN-DATA-TABLES §0b).
|
|
34
|
-
*/
|
|
35
25
|
export declare const dataTableAttributes: (table: DataTableDefinition) => Record<string, string>;
|
|
36
26
|
//# sourceMappingURL=DataTableFormula.d.ts.map
|
|
@@ -43,11 +43,6 @@ export type DvType = typeof DvType[keyof typeof DvType];
|
|
|
43
43
|
* `$A$1:$A$5` are formula text by type, carried verbatim with no marker.
|
|
44
44
|
*/
|
|
45
45
|
export declare function formulaToParam(text: string, type: string | undefined): Scalar;
|
|
46
|
-
/**
|
|
47
|
-
* The most characters Excel reads from a `dataValidation`'s `prompt`, `error`, `promptTitle` or
|
|
48
|
-
* `errorTitle`. One more and Excel refuses to open the workbook at all (probe P5). Excel's own
|
|
49
|
-
* authoring stops sooner (titles 32, prompt 254, error 225); the file is what matters here.
|
|
50
|
-
*/
|
|
51
46
|
export declare const MAX_MESSAGE_LENGTH = 255;
|
|
52
47
|
/**
|
|
53
48
|
* `text` cut to {@link MAX_MESSAGE_LENGTH}, never splitting a surrogate pair; `warn` names the
|
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Excel calculation-engine stamp this package is verified against.
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* The writer stamps a workbook that has no source of its own with these, and the reader's
|
|
6
|
-
* calc-on-load policy compares a file's `calcId` against the same build. Raise the two together,
|
|
7
|
-
* and only alongside the oracle they name.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* The `calcPr@calcId` of the Excel build this engine's results are verified against.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* `calcId` is the version of the Excel calculation engine that last calculated a file. On open,
|
|
14
|
-
* Excel trusts the stored values when the id is its own or newer and performs a FULL
|
|
15
|
-
* recalculation when it is older or absent — which turns every citation of a closed external
|
|
16
|
-
* book into `#REF!` (DESIGN-EXTERNAL-LINKS phase D). So a written workbook is stamped with the id
|
|
17
|
-
* of the build this engine's results are verified against — the COM oracle, Excel 16.0, which
|
|
18
|
-
* writes `191029` (`externalLinksNames.xlsx`, authored by it 2026-09-11) — and a source file's own
|
|
19
|
-
* id is carried through unchanged, so a resave keeps exactly the trust the original had. A later
|
|
20
|
-
* Excel, whose id is higher, recalculates on open as it does for its own older files.
|
|
21
|
-
*
|
|
22
|
-
* On read, a file whose id is absent or below this one is recalculated as Excel would.
|
|
23
|
-
*/
|
|
24
1
|
export declare const EXCEL_CALC_ID_VERIFIED = "191029";
|
|
25
|
-
/**
|
|
26
|
-
* The `xcalcf:calcFeatures` extension written for a workbook that has no source list of its own —
|
|
27
|
-
* the other half of the trust {@link EXCEL_CALC_ID_VERIFIED} buys.
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* Since 2018 Excel also records which calculation FEATURES the engine that last calculated the
|
|
31
|
-
* file had (`microsoft.com:RD`, `Single`, `LET_WF`, …), and recalculates a file on open whose
|
|
32
|
-
* list lacks any of its own — measured 2026-09-11 through the COM oracle: Excel's own resave of
|
|
33
|
-
* `externalLinksNames.xlsx` opens with its stored values, and the same file with ONLY this
|
|
34
|
-
* extension removed opens recalculated (`#REF!`, `#NAME?`), while removing `calcChain.xml` or
|
|
35
|
-
* spelling a legacy cell `_xlfn.SINGLE(...)` changes nothing. The list is the one that Excel
|
|
36
|
-
* build writes; a source file's own is carried through unchanged.
|
|
37
|
-
*/
|
|
38
2
|
export declare const EXCEL_CALC_FEATURES_VERIFIED: string;
|
|
39
3
|
//# sourceMappingURL=ExcelCalcStamp.d.ts.map
|
|
@@ -1,74 +1,8 @@
|
|
|
1
1
|
import { IFunction, IRange, INamed, IWorksheet, ICalculation } from '@sheetxl/sdk';
|
|
2
|
-
/**
|
|
3
|
-
* The implicit-intersection translation between the modern (dynamic) formula model and what a
|
|
4
|
-
* legacy xlsx `<f>` means — item 47's `ExcelCompat.ts`, born in io-xlsx
|
|
5
|
-
* (DESIGN-FORMULA-DIALECT.md §3).
|
|
6
|
-
*
|
|
7
|
-
* Both directions live here, built on ONE site rule so they cannot drift (FORMULA-SEMANTICS §6.1
|
|
8
|
-
* — after the read transform a divergence is a wrong VALUE, not non-canonical XML):
|
|
9
|
-
*
|
|
10
|
-
* - READ (rules 1/2): a plain `<f>` — no `t="array"`, no `cm` — has legacy semantics whatever its
|
|
11
|
-
* age, and loading it means putting the `@` back where Excel would
|
|
12
|
-
* (`=ABS(A1:A5)` → `=ABS(@A1:A5)`). The decision is per CELL, and the bit rides BESIDE the
|
|
13
|
-
* formula exactly as it does on disk, never inside it: `cm=`/`t="array"` are cell attributes,
|
|
14
|
-
* the reader records their extents in `sheet.formulaArray`, and the load asks per formula which
|
|
15
|
-
* of {@link createCompatReadTransforms}' two transforms to run
|
|
16
|
-
* (`ICalculation.FormulaTransformContext`).
|
|
17
|
-
* - WRITE: the `cm="1"` + `t="array"` marker goes on every formula legacy intersection would
|
|
18
|
-
* change — {@link hasIntersectionSite}, answered beside the formula by the dialect's `annotate`
|
|
19
|
-
* ({@link registerXlsxFormulaDialect}) and read by `WorksheetEmitter`. On a formula written
|
|
20
|
-
* PLAIN, an `@` the legacy read would put back is not spelled at all — Excel elides it and
|
|
21
|
-
* spells `_xlfn.SINGLE` only where the read would not re-insert it
|
|
22
|
-
* ({@link createCompatWriteTransform}).
|
|
23
|
-
*
|
|
24
|
-
* ### An unknown function is a range
|
|
25
|
-
*
|
|
26
|
-
* A call to a function Excel does not know (an add-in or user-defined function — `CASCADESPARKLINE`
|
|
27
|
-
* from SpreadJS, `FOO`) has an unknown return, and Excel treats that as range-VALUED: the call
|
|
28
|
-
* takes an `@` at the root and at every scalar site holding it, never on its own arguments, and
|
|
29
|
-
* never inside a range-accepting slot. Measured `probe-unknown-function-intersect.ps1`
|
|
30
|
-
* (2026-09-03): `=FOO(1)` opens as `=@FOO(1)`, `=ABS(FOO(1))` as `=ABS(@FOO(1))`,
|
|
31
|
-
* `=IF(TRUE,FOO(1),2)` as `=@IF(TRUE,FOO(1),2)`, `=FOO(A1:A5)` as `=@FOO(A1:A5)`, while
|
|
32
|
-
* `=SUM(FOO(1))`, `=SUMPRODUCT(FOO(A1:A5))` and `=N(FOO(1))` stay plain. The value is `#NAME?`
|
|
33
|
-
* either way — what the rule decides is whether the file round-trips to the same TEXT, which
|
|
34
|
-
* matters the day the function exists (the same file opened by the application that wrote it).
|
|
35
|
-
*
|
|
36
|
-
* ### Two kinds of arrayness, and only one of them is a site
|
|
37
|
-
*
|
|
38
|
-
* Being an array is not the same question as being intersected. Arrayness that comes from a
|
|
39
|
-
* REFERENCE — a range, a spill anchor, a table reference, a defined name, an array-returning or
|
|
40
|
-
* `valueReturn` call — is a site wherever a value-typed slot holds it, whatever encloses it.
|
|
41
|
-
* Arrayness that comes from an inline array CONSTANT is not: legacy Excel LIFTS `{…}` and only
|
|
42
|
-
* collapses it where one value is genuinely wanted, which is the cell root and whatever the root's
|
|
43
|
-
* demand reaches through ({@link _childDemand}). That is the split `constants` carries through
|
|
44
|
-
* {@link _isRangeValued}.
|
|
45
|
-
*
|
|
46
|
-
* Measured on plain-`<f>` opens, `probe-array-constant-intersection{,2}.ps1` (40 rows, 2026-08-17):
|
|
47
|
-
* `={1,2,3}` opens as `=@{1,2,3}` and `=ABS({-1,-2,-3})` as `=ABS(@{-1,-2,-3})`, while
|
|
48
|
-
* `=SUM(ABS({-1,-2,-3}))` opens UNTOUCHED at 6 — where the same shape over a range,
|
|
49
|
-
* `=SUM(ABS(H1:H3))`, opens as `=SUM(ABS(@H1:H3))`. A name is reference-derived even when its body
|
|
50
|
-
* is a constant, which is the pair that kills the simpler reading: `=SUM(ArrConst&0)` opens as
|
|
51
|
-
* `=SUM(@ArrConst&0)` = 10 against `=SUM({1,2,3}&0)` = 0.
|
|
52
|
-
*
|
|
53
|
-
* ### Everything measured; facts OVERRIDE declarations
|
|
54
|
-
*
|
|
55
|
-
* Every per-function fact the rules below consult lives in the measured `ExcelFunctionFacts` map
|
|
56
|
-
* (one row per name, probe provenance and slot addressing documented there). The registry's
|
|
57
|
-
* declarations state what a BODY needs and serve as the DEFAULT; wherever Excel measurably
|
|
58
|
-
* disagrees, the fact wins (CALC-ISSUES item 44: "use the measured list, not a derived
|
|
59
|
-
* predicate"). Re-run the probes when adding a function — no test can detect a new function Excel
|
|
60
|
-
* happens to disagree with.
|
|
61
|
-
*/
|
|
62
2
|
/** Does any call in this tree name a function on Excel's volatile list
|
|
63
3
|
* (`ExcelFunctionFact.volatile`)? (Defined-name bodies are not chased: Excel's `ca` reflects the
|
|
64
4
|
* CELL's own formula text.) */
|
|
65
5
|
export declare const hasVolatileCall: (root: ICalculation.FormulaNode | undefined) => boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Does this tree call a function the registry does not know? An unknown call is what Excel's
|
|
68
|
-
* `ca="1"` records on a cell that reached a user-defined function during its last calculation
|
|
69
|
-
* (measured on every `FOO` cell of `probe-unknown-function-intersect.ps1`) — static here where
|
|
70
|
-
* Excel's is a runtime fact, so a call on an untaken lazy branch is flagged too.
|
|
71
|
-
*/
|
|
72
6
|
export declare const hasUnknownCall: (root: ICalculation.FormulaNode | undefined, ctx: CompatContext) => boolean;
|
|
73
7
|
/** What the walks read of a function: its declared slots and return, and whether it is a built-in. */
|
|
74
8
|
export interface CompatFunction {
|
|
@@ -110,31 +44,6 @@ export interface CompatContext {
|
|
|
110
44
|
* every rule above traces to Excel's own insertion, not our reading of it.
|
|
111
45
|
*/
|
|
112
46
|
export declare const insertImplicitIntersection: (root: ICalculation.FormulaNode, ctx: CompatContext) => ICalculation.FormulaNode;
|
|
113
|
-
/**
|
|
114
|
-
* The WRITE decision — whether legacy implicit intersection would change this formula's meaning,
|
|
115
|
-
* which is the exact condition under which Excel writes `cm="1"` + `t="array"`.
|
|
116
|
-
*
|
|
117
|
-
* @remarks
|
|
118
|
-
* A STATIC property of the formula, not the value: `=IF(FALSE,H1:H3,5)` computes `5` and is still
|
|
119
|
-
* marked. The same rule as {@link insertImplicitIntersection} by construction: a formula is
|
|
120
|
-
* marked exactly when the insertion would change it — plus one clause the insertion rule does not
|
|
121
|
-
* share: a `call` node ANYWHERE marks, because immediate application does not exist in the legacy
|
|
122
|
-
* dialect at all. Measured (`probe-lambda-call.xlsx`, every accepted case): Excel puts
|
|
123
|
-
* `cm="1"` + `t="array"` on `SUM(LAMBDA(x,x+1)(3),1)` (call in an argument slot, scalar root),
|
|
124
|
-
* `MyLam(3)`, `A1(3)`, `-LAMBDA(x,-x)(1)`, the curried and partial forms — all of them. Without
|
|
125
|
-
* the marker Excel reads the cell back as a LEGACY formula and re-inserts `@` at the root and on
|
|
126
|
-
* the lambda parameters (`=@LAMBDA(a,b,@a+@b)(1,2)`), which is exactly what the Excel-open gate
|
|
127
|
-
* caught (verify-lambda-call-opens.ps1, 2026-08-13).
|
|
128
|
-
*
|
|
129
|
-
* "Marked exactly when the insertion would change it" is OUR rule, and Excel's marker is not
|
|
130
|
-
* only that — measured `probe-sumproduct-monthyear.ps1` + `probe-slot-class-intersect2.ps1`
|
|
131
|
-
* (2026-08-14): the same text entered through legacy `.Formula` saves PLAIN and through modern
|
|
132
|
-
* `.Formula2` saves `cm="1" t="array"`, at identical values, on every array-scope shape here. So
|
|
133
|
-
* Excel's marker also records the ENTRY CHANNEL, which we do not persist. We write the legacy
|
|
134
|
-
* channel's answer, which is the self-consistent one: the file we emit reads back — by Excel and
|
|
135
|
-
* by us — to the tree we emitted it from. Carrying a read-side "was marked" bit instead is the
|
|
136
|
-
* open alternative.
|
|
137
|
-
*/
|
|
138
47
|
export declare const hasIntersectionSite: (root: ICalculation.FormulaNode, ctx: CompatContext) => boolean;
|
|
139
48
|
/** The reader's two READ transforms — see {@link createCompatReadTransforms}. */
|
|
140
49
|
export interface CompatReadTransforms {
|
|
@@ -178,29 +87,6 @@ export interface XlsxFormulaAnnotation {
|
|
|
178
87
|
}
|
|
179
88
|
/** Where a save's emitters find the workbook's dialect (`EmitContext.getSharedStates`). */
|
|
180
89
|
export declare const SHARED_STATE_XLSX_FORMULA_DIALECT = "xlsxFormulaDialect";
|
|
181
|
-
/**
|
|
182
|
-
* The xlsx formula dialect for one workbook: how this format spells formulas, applied to formula
|
|
183
|
-
* TEXT, with no calculation involved (DESIGN-CALC-SERVICE §9).
|
|
184
|
-
*
|
|
185
|
-
* - READ: the on-disk legacy spellings (`_xlfn.`, `_xlws.`, `_xleta.`, `_xlpm.`, `SINGLE`,
|
|
186
|
-
* `ANCHORARRAY`, `_TRO_*`, `_LONGTEXT`) unwrapped, and for a plain cell the implicit-intersection
|
|
187
|
-
* `@` operators Excel would show, exactly where it would ({@link CompatReadTransforms.legacy});
|
|
188
|
-
* an array anchor and a detached formula take the unwrap alone.
|
|
189
|
-
* - WRITE: the legacy spellings on every formula, plus, for a plain cell, the elision of each `@`
|
|
190
|
-
* the read would put back ({@link createCompatWriteTransform}).
|
|
191
|
-
* - ANNOTATE: an {@link XlsxFormulaAnnotation}.
|
|
192
|
-
*
|
|
193
|
-
* Functions are answered from the built-in declarations, defined names from the workbook's names
|
|
194
|
-
* as text; neither needs an engine.
|
|
195
|
-
*
|
|
196
|
-
* A DETACHED formula is one with no cell of its own: a defined name, a conditional format or data
|
|
197
|
-
* validation operand, a cfvo value. Excel evaluates a condition body in CSE mode (nothing
|
|
198
|
-
* intersects, measured `probe-cf-intersect.ps1`) and writes it plain with no `cm=`, so the
|
|
199
|
-
* plain-cell `@` insertion and elision never apply to it — only the spelling does. That spelling
|
|
200
|
-
* needs no names, so a dialect built with none ({@link createXlsxFormulaDialect}) answers
|
|
201
|
-
* {@link readDetached} completely; it is what the reader hands the worksheet visitors before the
|
|
202
|
-
* workbook's names have been read.
|
|
203
|
-
*/
|
|
204
90
|
export interface XlsxFormulaDialect {
|
|
205
91
|
/**
|
|
206
92
|
* The tree of the model's canonical text written at `anchor`, in the shape the compiled tree
|
|
@@ -279,31 +165,5 @@ export declare function readSheetFormulas(sheet: IWorksheet.JSON, dialect: XlsxF
|
|
|
279
165
|
* takes no insertion on read, so every `@` on it has to be explicit.
|
|
280
166
|
*/
|
|
281
167
|
export declare const impliedIntersections: (root: ICalculation.FormulaNode, ctx: CompatContext) => Set<ICalculation.FormulaNode>;
|
|
282
|
-
/**
|
|
283
|
-
* The writer's complete WRITE transform for a CELL formula: the legacy spelling on every node
|
|
284
|
-
* (`createLegacyWriteTransform`), plus — at the root of a formula that will be written plain —
|
|
285
|
-
* the elision of every `@` the legacy read would put back.
|
|
286
|
-
*
|
|
287
|
-
* @remarks
|
|
288
|
-
* Excel's own spelling of a modern `@`, measured `probe-at-elision.ps1` (2026-09-03): `=@A1:A5`
|
|
289
|
-
* saves as `A1:A5`, `=ABS(@A1:A5)` as `ABS(A1:A5)`, `=@FOO(1)` as `FOO(1)`, `=@SEQUENCE(5)` as
|
|
290
|
-
* `_xlfn.SEQUENCE(5)`; `_xlfn.SINGLE` appears only where the read would NOT re-insert —
|
|
291
|
-
* `SUM(_xlfn.SINGLE(A1:A5))`, `SUMPRODUCT(ABS(_xlfn.SINGLE(A1:A5)))`, `_xlfn.SINGLE(SUM(1))`,
|
|
292
|
-
* `_xlfn.SINGLE((A1:A5))`. A formula that still has a site after its `@`s are honored is a
|
|
293
|
-
* MARKED cell (`cm="1"`) and keeps every `@` explicit (`=@ABS(A1:A5)` →
|
|
294
|
-
* `_xlfn.SINGLE(ABS(A1:A5))` under `cm="1"`), because no insertion runs on it. The text is
|
|
295
|
-
* therefore self-consistent in both readers: what comes back is the tree that went out.
|
|
296
|
-
*
|
|
297
|
-
* This is why the SpreadJS/add-in round trip closes: `=@CASCADESPARKLINE(...)` — the modern
|
|
298
|
-
* form of the plain `<f>` the authoring application wrote — goes back out as that same plain
|
|
299
|
-
* `<f>`, which is the only spelling the authoring application knows.
|
|
300
|
-
*
|
|
301
|
-
* Mechanics: the spelling runs in the SDK's own post-order walk (fresh nodes keep their trivia
|
|
302
|
-
* that way), so by the root every `@` is already a `SINGLE` call. The root pass unwraps a VIEW of
|
|
303
|
-
* the spelled tree to ask the modern-tree questions, maps each implied `@` of the view back to
|
|
304
|
-
* the `SINGLE` node it came from, and drops those nodes copy-on-write — every untouched node
|
|
305
|
-
* keeps its identity, and its whitespace. Defined names and array-anchored cells take the
|
|
306
|
-
* spelling pass only (`WorkbookEmitter`'s write provider decides per block; names never run this).
|
|
307
|
-
*/
|
|
308
168
|
export declare function createCompatWriteTransform(legacy: ICalculation.FormulaTransform, ctx: CompatContext): ICalculation.FormulaTransform;
|
|
309
169
|
//# sourceMappingURL=ExcelCompat.d.ts.map
|