@sheetxl/io-xlsx 0.8.0-beta.10 → 0.8.0-beta.12

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 (143) hide show
  1. package/browser/esm/{BLXcoiDAaOMjFuhw.mjs → 9dwUocbOsJuAcmKn.mjs} +3021 -1986
  2. package/browser/esm/{xc_LzCPgHn-acgFZ.mjs → BIvDjK4Zl8bWRgl8.mjs} +2 -2
  3. package/browser/esm/CcH5ITJFTMVWUJO9.mjs +6154 -0
  4. package/browser/esm/{CI_CZI5m5-KkiAK5.mjs → D8k22TSWPd_RHEpj.mjs} +1798 -1009
  5. package/browser/esm/{BKT8OBj-bhQwdg49.mjs → DKnOwucZq4z9_-r-.mjs} +47 -10
  6. package/browser/esm/{2EOdn2WRK5y1L58S.mjs → DO75RoAQTgMuVzXv.mjs} +2 -2
  7. package/browser/esm/{NQIuOQIleHC4NUW6.mjs → DVLJTjJCGqrJUa8c.mjs} +587 -705
  8. package/browser/esm/DeMZN_qj__PKo4Wh.mjs +2265 -0
  9. package/browser/esm/{DXopGe8PrLWmwGaV.mjs → DsppUz-14Z7ti9i3.mjs} +1 -1
  10. package/browser/esm/{B-jb5SuiVh5NnBG_.mjs → aUBXbTh2r0u3x4Xo.mjs} +2 -2
  11. package/browser/esm/index.mjs +2 -2
  12. package/node/esm/BmIIQODk4dBVIXA4.mjs +4455 -0
  13. package/node/esm/{CHqRP_NjPpPd7m9L.mjs → C-e5AO_4TnGywT-m.mjs} +1 -1
  14. package/node/esm/C78E45n6j2E8rruH.mjs +5694 -0
  15. package/node/esm/CDKm5s3JE_d99TJw.mjs +2369 -0
  16. package/node/esm/{BmdmvgO5Zdgx-RWo.mjs → DCaAOfuW-w_dx_qd.mjs} +2 -2
  17. package/node/esm/{O5mti2R9drFOlXc7.mjs → DSgxL0sBZtWMydVl.mjs} +2 -2
  18. package/node/esm/DXusvwW73FUDSyvD.mjs +6367 -0
  19. package/node/esm/DsyuWxk3bdGhJUQN.mjs +2346 -0
  20. package/node/esm/index.mjs +64 -27
  21. package/package.json +3 -3
  22. package/types/src/AutoFilterRules.d.ts +8 -1
  23. package/types/src/DataTableFormula.d.ts +36 -0
  24. package/types/src/DefinedNameAttributes.d.ts +8 -0
  25. package/types/src/ExcelCompat.d.ts +15 -3
  26. package/types/src/KnownFonts.d.ts +50 -0
  27. package/types/src/LegacyFormula.d.ts +13 -0
  28. package/types/src/PageLayoutAttributes.d.ts +8 -0
  29. package/types/src/Plugin.d.ts +12 -0
  30. package/types/src/ProtectionAttributes.d.ts +2 -2
  31. package/types/src/SheetKinds.d.ts +57 -0
  32. package/types/src/SheetViewAttributes.d.ts +4 -0
  33. package/types/src/SortExtent.d.ts +16 -0
  34. package/types/src/Types.d.ts +11 -0
  35. package/types/src/XlsxHeader.d.ts +19 -0
  36. package/types/src/chart/ChartExXml.d.ts +38 -0
  37. package/types/src/chart/ChartPartXml.d.ts +47 -0
  38. package/types/src/chart/ChartSpaceXml.d.ts +37 -0
  39. package/types/src/chart/_XmlTree.d.ts +34 -0
  40. package/types/src/chart/_chartCodecs.d.ts +12 -0
  41. package/types/src/chart/_chartExCodecs.d.ts +7 -0
  42. package/types/src/chart/_chartExFold.d.ts +14 -0
  43. package/types/src/chart/_chartExMarkup.d.ts +236 -0
  44. package/types/src/chart/_chartExStyle.d.ts +22 -0
  45. package/types/src/chart/_codec.d.ts +78 -0
  46. package/types/src/chart/_drawingml.d.ts +10 -0
  47. package/types/src/chart/_xml.d.ts +70 -0
  48. package/types/src/reader/CellControls.d.ts +18 -0
  49. package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
  50. package/types/src/reader/DummyFunctionUnwrap.d.ts +2 -2
  51. package/types/src/reader/HeaderStyles.d.ts +15 -0
  52. package/types/src/reader/IsoDateCell.d.ts +20 -0
  53. package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
  54. package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
  55. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -3
  56. package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
  57. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +3 -1
  58. package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +2 -2
  59. package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +23 -8
  60. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -1
  61. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +27 -0
  62. package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
  63. package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
  64. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  65. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +8 -0
  66. package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
  67. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  68. package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
  69. package/types/src/reader/domVisitors/index.d.ts +4 -34
  70. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  71. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +46 -6
  72. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +24 -8
  73. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  74. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  75. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  76. package/types/src/richValue/RichDataParts.d.ts +69 -0
  77. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  78. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  79. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  80. package/types/src/richValue/WebImageRichValueHandler.d.ts +42 -0
  81. package/types/src/richValue/index.d.ts +7 -0
  82. package/types/src/utils/DrawingMLText.d.ts +2 -2
  83. package/types/src/utils/FormControls.d.ts +4 -4
  84. package/types/src/utils/SharedNames.d.ts +13 -0
  85. package/types/src/utils/SpreadsheetFont.d.ts +38 -0
  86. package/types/src/utils/VmlNoteShapes.d.ts +16 -23
  87. package/types/src/utils/VmlNoteStyle.d.ts +44 -0
  88. package/types/src/utils/VmlPrefixes.d.ts +24 -0
  89. package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
  90. package/types/src/writer/builder/Types.d.ts +7 -0
  91. package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
  92. package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
  93. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +18 -0
  94. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
  95. package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
  96. package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
  97. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  98. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  99. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  100. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  101. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  102. package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
  103. package/types/src/writer/emitters/SlicerEmitter.d.ts +8 -5
  104. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  105. package/types/src/writer/emitters/WorkbookEmitter.d.ts +5 -0
  106. package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
  107. package/types/src/writer/utils/AutoFilter.d.ts +1 -1
  108. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  109. package/types/src/writer/utils/DefaultRows.d.ts +38 -0
  110. package/types/src/writer/utils/DxfCollector.d.ts +11 -8
  111. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +1 -1
  112. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  113. package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
  114. package/types/src/writer/utils/TextUtils.d.ts +6 -1
  115. package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
  116. package/browser/esm/BPmehfSqdvgsLBsB.mjs +0 -5153
  117. package/node/esm/BpxxiZ2oKPkUSfdB.mjs +0 -2486
  118. package/node/esm/CtAF486aZqYzMeLM.mjs +0 -3651
  119. package/node/esm/QS_theNoeqNGLStj.mjs +0 -5298
  120. package/node/esm/nNQ7MG89sGKwkjMA.mjs +0 -4649
  121. package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
  122. package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
  123. package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
  124. package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
  125. package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
  126. package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
  127. package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
  128. package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
  129. package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
  130. package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
  131. package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
  132. package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
  133. package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
  134. package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
  135. package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
  136. package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
  137. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  138. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
  139. package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
  140. package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
  141. package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
  142. package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
  143. package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.10
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.12
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.
6
6
  */
7
7
  import { defineLazyModule as e } from "@sheetxl/utils";
8
- var t = [
8
+ var a = [
9
9
  208,
10
10
  207,
11
11
  17,
@@ -14,54 +14,91 @@ var t = [
14
14
  177,
15
15
  26,
16
16
  225
17
- ], a = async () => (await import("./BmdmvgO5Zdgx-RWo.mjs")).OffCryptoEncryption, r = {
17
+ ], t = async () => (await import("./DCaAOfuW-w_dx_qd.mjs")).OffCryptoEncryption, r = {
18
18
  key: "offcrypto",
19
19
  description: "Office Document Encryption",
20
20
  detect: async (e) => !!((e) => {
21
- if (e.byteLength < t.length) return !1;
22
- const a = new Uint8Array(e, 0, t.length);
23
- for (let e = 0; e < t.length; e++) if (a[e] !== t[e]) return !1;
21
+ if (e.byteLength < a.length) return !1;
22
+ const t = new Uint8Array(e, 0, a.length);
23
+ for (let e = 0; e < a.length; e++) if (t[e] !== a[e]) return !1;
24
24
  return !0;
25
- })(e) && (await a()).detect(e),
26
- decode: async (e, t) => (await a()).decode(e, t),
27
- encode: async (e, t) => (await a()).encode(e, t)
28
- }, o = e("io-xlsx:reader", () => import("./CtAF486aZqYzMeLM.mjs").then((e) => e.t)), i = e("io-xlsx:writer", () => import("./QS_theNoeqNGLStj.mjs")), n = "Excel", s = "ExcelMacro", c = {
29
- key: n,
25
+ })(e) && (await t()).detect(e),
26
+ decode: async (e, a) => (await t()).decode(e, a),
27
+ encode: async (e, a) => (await t()).encode(e, a)
28
+ }, i = e("io-xlsx:reader", () => import("./BmIIQODk4dBVIXA4.mjs").then((e) => e.t)), o = e("io-xlsx:writer", () => import("./DXusvwW73FUDSyvD.mjs")), l = "Excel", n = "ExcelMacro", c = "ExcelTemplate", m = "ExcelMacroTemplate", s = [
29
+ l,
30
+ n,
31
+ c,
32
+ m
33
+ ], d = {
34
+ key: l,
30
35
  description: "Excel Workbook",
31
36
  mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
32
37
  exts: ["xlsx", "xls"],
33
- handler: async (e, t) => (await o.load()).readXLSX(e, t)
34
- }, l = {
35
- key: s,
38
+ handler: async (e, a) => (await i.load()).readXLSX(e, a)
39
+ }, p = {
40
+ key: n,
36
41
  description: "Excel Macro-Enabled Workbook",
37
42
  mimeType: "application/vnd.ms-excel.sheet.macroEnabled.12",
38
43
  exts: ["xlsm"],
39
- handler: async (e, t) => (await o.load()).readXLSX(e, t)
40
- }, d = {
41
- key: n,
44
+ handler: async (e, a) => (await i.load()).readXLSX(e, a)
45
+ }, x = {
46
+ key: c,
47
+ description: "Excel Template",
48
+ mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
49
+ exts: ["xltx"],
50
+ handler: async (e, a) => (await i.load()).readXLSX(e, a)
51
+ }, y = {
52
+ key: m,
53
+ description: "Excel Macro-Enabled Template",
54
+ mimeType: "application/vnd.ms-excel.template.macroEnabled.12",
55
+ exts: ["xltm"],
56
+ handler: async (e, a) => (await i.load()).readXLSX(e, a)
57
+ }, w = {
58
+ key: l,
42
59
  mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
43
60
  description: "Excel Workbook",
44
61
  exts: ["xlsx"],
45
- handler: async (e, t) => (await i.load()).writeXLSX(e, {
46
- ...t,
62
+ handler: async (e, a) => (await o.load()).writeXLSX(e, {
63
+ ...a,
47
64
  macroEnabled: !1
48
65
  })
49
- }, m = {
50
- key: s,
66
+ }, E = {
67
+ key: n,
51
68
  mimeType: "application/vnd.ms-excel.sheet.macroEnabled.12",
52
69
  description: "Excel Macro-Enabled Workbook",
53
70
  exts: ["xlsm"],
54
- handler: async (e, t) => (await i.load()).writeXLSX(e, {
55
- ...t,
71
+ handler: async (e, a) => (await o.load()).writeXLSX(e, {
72
+ ...a,
56
73
  macroEnabled: !0
57
74
  })
58
- }, p = {
75
+ }, h = {
76
+ key: c,
77
+ mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
78
+ description: "Excel Template",
79
+ exts: ["xltx"],
80
+ handler: async (e, a) => (await o.load()).writeXLSX(e, {
81
+ ...a,
82
+ macroEnabled: !1,
83
+ template: !0
84
+ })
85
+ }, f = {
86
+ key: m,
87
+ mimeType: "application/vnd.ms-excel.template.macroEnabled.12",
88
+ description: "Excel Macro-Enabled Template",
89
+ exts: ["xltm"],
90
+ handler: async (e, a) => (await o.load()).writeXLSX(e, {
91
+ ...a,
92
+ macroEnabled: !0,
93
+ template: !0
94
+ })
95
+ }, X = {
59
96
  name: "@sheetxl/io-xlsx",
60
- version: "0.8.0-beta.10",
97
+ version: "0.8.0-beta.12",
61
98
  description: "XLSX I/O formats for SheetXL",
62
99
  author: "SheetXL",
63
100
  async register(e) {
64
- await e.registerReadFormat(c), await e.registerReadFormat(l), await e.registerWriteFormat(d), await e.registerWriteFormat(m), await e.registerEncryption(r);
101
+ await e.registerReadFormat(d), await e.registerReadFormat(p), await e.registerReadFormat(x), await e.registerReadFormat(y), await e.registerWriteFormat(w), await e.registerWriteFormat(E), await e.registerWriteFormat(h), await e.registerWriteFormat(f), await e.registerEncryption(r);
65
102
  }
66
103
  };
67
- export { p as IOPlugin, s as XLSM_FORMAT_KEY, n as XLSX_FORMAT_KEY };
104
+ export { s as EXCEL_FORMAT_KEYS, X as IOPlugin, n as XLSM_FORMAT_KEY, l as XLSX_FORMAT_KEY, m as XLTM_FORMAT_KEY, c as XLTX_FORMAT_KEY };
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.10",
4
+ "version": "0.8.0-beta.12",
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.10",
48
- "@sheetxl/utils": "^0.8.0-beta.10",
47
+ "@sheetxl/sdk": "^0.8.0-beta.12",
48
+ "@sheetxl/utils": "^0.8.0-beta.12",
49
49
  "@xmldom/xmldom": "^0.9.12",
50
50
  "@zip.js/zip.js": "^2.23.0",
51
51
  "web-streams-polyfill": "^4.3.0",
@@ -1,4 +1,4 @@
1
- import { ICondition } from '@sheetxl/sdk';
1
+ import { ICondition, ISort } from '@sheetxl/sdk';
2
2
  /**
3
3
  * The `dynamicFilter/@type` values that are a period (ST_DynamicFilterType less the two averages
4
4
  * and `null`). The SDK's `last7Days` is not among them.
@@ -135,4 +135,11 @@ export declare function fromCondition(condition: ICondition.JSON | undefined | n
135
135
  * under Display.
136
136
  */
137
137
  export declare function toFilterItem(condition: ICondition.JSON | undefined | null): string | null;
138
+ /**
139
+ * The `sortCondition/@sortBy` for a sort's `sortOn`. Excel spells the fill `cellColor`; the other
140
+ * kinds are spelled the same. `value`, the default, is not written.
141
+ */
142
+ export declare function toSortBy(sortOn: ISort.SortOn | undefined): string | undefined;
143
+ /** The `sortOn` a `sortCondition/@sortBy` means; see {@link toSortBy}. */
144
+ export declare function fromSortBy(sortBy: string | null | undefined): ISort.SortOn | undefined;
138
145
  //# sourceMappingURL=AutoFilterRules.d.ts.map
@@ -0,0 +1,36 @@
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
+ export interface DataTableDefinition {
8
+ /** The result cells. */
9
+ ref: IRange.Coords;
10
+ /** The row input's address; absent for a one-input table down a column. */
11
+ rowInput?: string;
12
+ /** The column input's address; absent for a one-input table along a row. */
13
+ columnInput?: string;
14
+ /** The row input was deleted: the argument is `#REF!`. `rowInput` is its last address, if known. */
15
+ rowInputDeleted?: boolean;
16
+ /** The column input was deleted. */
17
+ columnInputDeleted?: boolean;
18
+ }
19
+ /** The `TABLE(...)` formula a definition is in the model, without the `=`, placed at `ref`'s top-left. */
20
+ export declare const toDataTableFormula: (table: DataTableDefinition) => string;
21
+ /**
22
+ * The definition a formula is, when the whole formula is one `TABLE(...)` call a file can hold as
23
+ * Excel's tag: two inputs that are each empty, `#REF!` or an unqualified cell, and two literal
24
+ * counts. `null` otherwise (a `TABLE` inside an expression, a computed count).
25
+ *
26
+ * @param text The formula text at the anchor, with or without the `=`.
27
+ * @param anchor The cell the formula sits in: the results' top-left.
28
+ */
29
+ 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
+ export declare const dataTableAttributes: (table: DataTableDefinition) => Record<string, string>;
36
+ //# sourceMappingURL=DataTableFormula.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * `CT_DefinedName`'s attributes that SheetXL carries as `INamed.FileAttributes`, in schema order.
3
+ * `functionGroupId` is the one number among them.
4
+ */
5
+ export declare const DEFINED_NAME_TEXT_ATTRIBUTES: readonly ["customMenu", "description", "help", "statusBar", "shortcutKey"];
6
+ /** The boolean ones, in schema order. Only a set flag is kept or written; each defaults to off. */
7
+ export declare const DEFINED_NAME_FLAG_ATTRIBUTES: readonly ["function", "vbProcedure", "xlm", "publishToServer", "workbookParameter"];
8
+ //# sourceMappingURL=DefinedNameAttributes.d.ts.map
@@ -1,4 +1,4 @@
1
- import { IFunction, IRange, INamed, ISheet, ICalculation } from '@sheetxl/sdk';
1
+ import { IFunction, IRange, INamed, IWorksheet, ICalculation } from '@sheetxl/sdk';
2
2
  /**
3
3
  * The implicit-intersection translation between the modern (dynamic) formula model and what a
4
4
  * legacy xlsx `<f>` means — item 47's `ExcelCompat.ts`, born in io-xlsx
@@ -230,6 +230,15 @@ export interface XlsxFormulaDialect {
230
230
  /** A defined name's canonical text spelled for the file. */
231
231
  writeName(text: string): string;
232
232
  }
233
+ /**
234
+ * The external links a save writes, for {@link createXlsxFormulaDialect}.
235
+ */
236
+ export interface XlsxExternalBooks {
237
+ /** How many `<externalReference>` positions the file will have. */
238
+ count: number;
239
+ /** Called for each citation of a position past {@link count}, as it is written `#REF!`. */
240
+ onDangling?: (n: number) => void;
241
+ }
233
242
  /**
234
243
  * Builds the dialect for a workbook.
235
244
  *
@@ -239,14 +248,17 @@ export interface XlsxFormulaDialect {
239
248
  * @param tables The workbook's table names. A bare table name (`=Sales`) parses as a name; the
240
249
  * file spells it as the table's data body (`Sales[]`), so the writer has to know which names are
241
250
  * tables.
251
+ * @param externalBooks The links a save writes. With it, {@link XlsxFormulaDialect.spell} and
252
+ * {@link XlsxFormulaDialect.writeName} write a citation of any other position as `#REF!`; a reader
253
+ * omits it.
242
254
  */
243
- export declare function createXlsxFormulaDialect(names?: readonly INamed.JSON[] | null, tables?: readonly string[] | null): XlsxFormulaDialect;
255
+ export declare function createXlsxFormulaDialect(names?: readonly INamed.JSON[] | null, tables?: readonly string[] | null, externalBooks?: XlsxExternalBooks | null): XlsxFormulaDialect;
244
256
  /**
245
257
  * Rewrites a sheet's formulas, as the reader recorded them, into canonical text in place. Plain
246
258
  * versus marked is a per-CELL fact on disk (`cm=` / `t="array"` are cell attributes), answered
247
259
  * from the `formulaArray` extents the reader recorded.
248
260
  */
249
- export declare function readSheetFormulas(sheet: ISheet.JSON, dialect: XlsxFormulaDialect): void;
261
+ export declare function readSheetFormulas(sheet: IWorksheet.JSON, dialect: XlsxFormulaDialect): void;
250
262
  /**
251
263
  * The `@` nodes of a modern tree that the legacy read would put back on its own — the ones a
252
264
  * PLAIN `<f>` does not need to spell.
@@ -0,0 +1,50 @@
1
+ import { IFontCollection } from '@sheetxl/sdk';
2
+ /**
3
+ * `x14ac:knownFonts` on `<fonts>` in `styles.xml`: whether a workbook's stored row heights were
4
+ * measured with the real fonts.
5
+ *
6
+ * Excel's rule, from `private-assets/design/rust/tools/oracle-excel-knownfonts.ps1` (2026-10-16):
7
+ * it writes the flag only when it knows every font in the file, and on open it keeps the stored
8
+ * heights of rows that are not custom only when the file has the flag, the Normal style's font is
9
+ * a theme font (`<scheme>`, as in every new workbook; one named outright is re-fitted whatever the
10
+ * flag says), and it knows every font itself; otherwise it re-fits those rows. Which font it is
11
+ * does not matter (Calibri, Arial and Aptos alike). Knowing a font, here, is measuring it with a
12
+ * table of its own: a shipped or added table, or an installed face, never a related family or a
13
+ * stand-in.
14
+ */
15
+ /** The `paramMap` key under which the styles part leaves what it read about its fonts. */
16
+ export declare const KNOWN_FONTS_PARAM = "knownFonts";
17
+ /** One face a workbook's fonts name. */
18
+ export interface KnownFontFace {
19
+ family: string;
20
+ bold: boolean;
21
+ italic: boolean;
22
+ }
23
+ /** What the styles part read: the flag, whether Normal's font is a theme font, and every face. */
24
+ export interface KnownFontsParam {
25
+ declared: boolean;
26
+ normalIsThemeFont: boolean;
27
+ faces: KnownFontFace[];
28
+ }
29
+ /** Whether `face` measures, now, from a table of its own. A face still loading is not known. */
30
+ export declare function isKnownFace(fonts: IFontCollection, face: KnownFontFace): boolean;
31
+ /**
32
+ * Whether `face` is a real font, one Excel would have: anything that resolves to more than a
33
+ * built-in generic table.
34
+ *
35
+ * @remarks
36
+ * Looser than {@link isKnownFace} on purpose. Reading, the question is whether Excel knew the font
37
+ * when it measured the stored heights, not whether we can measure it: Aptos resolves to a related
38
+ * family's table here (`classified`), but Excel, which ships it, measured the file with the real
39
+ * face. A font nobody has resolves to a generic table, and Excel re-fits those rows too.
40
+ */
41
+ export declare function isRecognizedFace(fonts: IFontCollection, face: KnownFontFace): boolean;
42
+ /** Whether every one of `faces` is recognized once its table has loaded. */
43
+ export declare function allFacesRecognized(faces: readonly KnownFontFace[]): Promise<boolean>;
44
+ /** The distinct faces of a list of font records, by family, weight and style. */
45
+ export declare function distinctFaces(fonts: readonly {
46
+ family?: string;
47
+ weight?: number;
48
+ style?: string;
49
+ }[]): KnownFontFace[];
50
+ //# sourceMappingURL=KnownFonts.d.ts.map
@@ -59,6 +59,19 @@ export declare const XLPM = "_xlpm.";
59
59
  * the display form re-images from `NamedRef.optional`.
60
60
  */
61
61
  export declare const XLOP = "_xlop.";
62
+ /**
63
+ * User-defined-function prefix (`_xludf.name`): a call to a function Excel does not resolve.
64
+ *
65
+ * Excel writes it on a name that would otherwise read as one of its own functions. Measured
66
+ * (`spreadsheetbench/formula-tests/probe-bare-future-function.ps1`, Excel 16.0, 2026-10-19): a
67
+ * function Excel stores with a prefix (`_xlfn.RRI`), stored BARE (`<f>RRI(A1,B1,C1)</f>`, as
68
+ * openpyxl and other non-Excel writers leave it), is read as a call to an unknown function -
69
+ * `=@RRI(A1,B1,C1)`, `#NAME?` - and saved untouched as `_xludf.RRI(A1,B1,C1)`; only re-entering
70
+ * the formula makes it the real `RRI`. The bare and the `_xludf.` spellings are the same formula to
71
+ * Excel, so the model holds both as `_xludf.RRI` and writes it bare: LibreOffice keeps whichever
72
+ * spelling it is given, and the bare one is what every other producer wrote.
73
+ */
74
+ export declare const XLUDF = "_xludf.";
62
75
  /**
63
76
  * The write direction: modern (dynamic) tree → on-disk xlsx spellings, as an
64
77
  * {@link ICalculation.FormulaTransform} — the `write` half of the xlsx dialect (`ExcelCompat`).
@@ -0,0 +1,8 @@
1
+ import { IPageLayout } from '@sheetxl/sdk';
2
+ /** `pageSetup@cellComments` and the model's value for it. `none` is the model's default. */
3
+ export declare const CELL_COMMENTS: readonly [attribute: string, value: IPageLayout.PrintComments][];
4
+ /** `pageSetup@errors` and the model's value for it. `displayed` is the model's default. */
5
+ export declare const PRINT_ERRORS: readonly [attribute: string, value: IPageLayout.PrintErrorType][];
6
+ /** The headers and footers in `<headerFooter>`, in the schema's order. */
7
+ export declare const HEADER_FOOTER_ELEMENTS: readonly ["oddHeader", "oddFooter", "evenHeader", "evenFooter", "firstHeader", "firstFooter"];
8
+ //# sourceMappingURL=PageLayoutAttributes.d.ts.map
@@ -18,6 +18,18 @@ export declare const XLSX_FORMAT_KEY = "Excel";
18
18
  * under an `.xlsm` name.
19
19
  */
20
20
  export declare const XLSM_FORMAT_KEY = "ExcelMacro";
21
+ /**
22
+ * The registry key for an Excel template (`.xltx`). Like {@link XLSM_FORMAT_KEY}, a format of its
23
+ * own because being a template is a property of the file written, not of the workbook: only the
24
+ * workbook part's content type differs.
25
+ */
26
+ export declare const XLTX_FORMAT_KEY = "ExcelTemplate";
27
+ /**
28
+ * The registry key for a macro-enabled Excel template (`.xltm`).
29
+ */
30
+ export declare const XLTM_FORMAT_KEY = "ExcelMacroTemplate";
31
+ /** Every format key this package reads and writes, all with the one reader and writer. */
32
+ export declare const EXCEL_FORMAT_KEYS: readonly string[];
21
33
  /**
22
34
  * Registers all built-in read and write formats with the provided WorkbookIO registry.
23
35
  *
@@ -1,4 +1,4 @@
1
- import { ISheetProtection, IWorkbookProtection } from '@sheetxl/sdk';
1
+ import { IWorksheetProtection, IWorkbookProtection } from '@sheetxl/sdk';
2
2
  /**
3
3
  * One protection attribute at the xlsx boundary.
4
4
  *
@@ -19,7 +19,7 @@ export interface ProtectionAttribute<K extends string> {
19
19
  ooxmlDefault: boolean;
20
20
  }
21
21
  /** `CT_SheetProtection`, in schema order. `showFormulas` has no attribute (formats carry it). */
22
- export declare const SheetProtectionAttributes: readonly ProtectionAttribute<keyof ISheetProtection.JSON>[];
22
+ export declare const WorksheetProtectionAttributes: readonly ProtectionAttribute<keyof IWorksheetProtection.JSON>[];
23
23
  /**
24
24
  * `CT_WorkbookProtection`'s lock flags. `revision` belongs to shared workbooks: nothing sets it, so an
25
25
  * unset one writes nothing rather than locking revisions on every protected workbook.
@@ -0,0 +1,57 @@
1
+ import { IOpaqueSheet, IWorkbook, IWorksheet } from '@sheetxl/sdk';
2
+ /** What a part of one kind is written as. */
3
+ export interface SheetKindPart {
4
+ relType: string;
5
+ contentType: string;
6
+ folder: string;
7
+ }
8
+ export declare const WorksheetPart: SheetKindPart;
9
+ /** As Excel writes each kind. */
10
+ export declare const SheetKindParts: Readonly<Record<IOpaqueSheet.Kind, SheetKindPart>>;
11
+ /** The worksheet a sheet ref holds, or `undefined` when it holds another kind (or nothing). */
12
+ export declare const worksheetJSON: (ref: IWorkbook.SheetRefJSON | null | undefined) => IWorksheet.JSON | undefined;
13
+ /** The carried part a sheet ref holds, or `undefined` when it holds a worksheet. */
14
+ export declare const opaqueSheetJSON: (ref: IWorkbook.SheetRefJSON | null | undefined) => IOpaqueSheet.JSON | undefined;
15
+ /** The kind a workbook relationship names, or `null` for a worksheet or anything else. */
16
+ export declare const sheetKindFromRelType: (relType: string | null | undefined) => IOpaqueSheet.Kind | null;
17
+ /**
18
+ * The attributes of the part's `sheetPr/tabColor`, or `null` when it has none.
19
+ */
20
+ export declare const readTabColorAttributes: (xml: string) => Map<string, string> | null;
21
+ /**
22
+ * The part with its `sheetPr/tabColor` replaced by `tabColorXml` (a whole `<tabColor/>` element), or
23
+ * removed when that is `null`.
24
+ *
25
+ * @remarks
26
+ * `tabColor` is the first child of `sheetPr` in every kind's schema, and `sheetPr` the first child of
27
+ * the root, so that is where each goes when absent.
28
+ */
29
+ export declare const patchTabColor: (xml: string, tabColorXml: string | null) => string;
30
+ /**
31
+ * The part with its first `sheetView@tabSelected` saying whether the tab is selected.
32
+ *
33
+ * @remarks
34
+ * A carried part keeps the source's flag, and Excel group-selects every sheet that has it on open
35
+ * (`probe-sheet-kinds-open.ps1`), so a stale one has to go.
36
+ */
37
+ export declare const patchTabSelected: (xml: string, selected: boolean) => string;
38
+ /**
39
+ * A macro sheet's part as a worksheet's: the root renamed, the body unchanged.
40
+ *
41
+ * @remarks
42
+ * What Excel does saving a macro sheet into a workbook that cannot hold one (`.xlsx`): the tab comes
43
+ * back as a worksheet holding the same cells (`probe-sheet-kinds-open.ps1`). The macro sheet's body
44
+ * is a worksheet's, element for element in the same order, so only the root changes.
45
+ */
46
+ export declare const macroSheetAsWorksheet: (xml: string) => string;
47
+ /**
48
+ * A macro sheet's part made independent of the workbook parts it cites by position: each shared
49
+ * string written inline, and the style, cell-metadata and value-metadata indexes dropped.
50
+ *
51
+ * @remarks
52
+ * The part is carried, but the workbook's shared strings and styles are rebuilt on every save, so a
53
+ * carried index would name another string or format, or none (a repair prompt). An inline string is
54
+ * the same text; a dropped style is the default format, which is lost.
55
+ */
56
+ export declare const detachMacroSheet: (xml: string, strings: readonly unknown[]) => string;
57
+ //# sourceMappingURL=SheetKinds.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { IWorksheetView } from '@sheetxl/sdk';
2
+ /** The `sheetView` attribute that holds each view mode's own zoom. */
3
+ export declare const VIEW_MODE_ZOOM_ATTRIBUTES: readonly [mode: IWorksheetView.ViewMode, attribute: 'zoomScaleNormal' | 'zoomScaleSheetLayoutView' | 'zoomScalePageLayoutView'][];
4
+ //# sourceMappingURL=SheetViewAttributes.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { IRange, ISort } from '@sheetxl/sdk';
2
+ /**
3
+ * A `sortState` or `sortCondition` ref as an {@link ISort.Extent} of the table or filter range it
4
+ * belongs to, and back. Excel records the range it last sorted, which need not be the table's
5
+ * (`ISort.JSON.extent`).
6
+ */
7
+ /** `ref`'s edges as offsets from `base`'s. */
8
+ export declare const toExtent: (base: IRange.Coords, ref: IRange.Coords) => ISort.Extent;
9
+ /** The range `extent` describes against `base`, or `null` when it would be empty or off the grid. */
10
+ export declare const fromExtent: (base: IRange.Coords, extent: ISort.Extent) => IRange.Coords | null;
11
+ /**
12
+ * A condition's extent, or `null` when its ref is just its column of the sort's range — the shape
13
+ * a sort made here writes, so it need not be carried.
14
+ */
15
+ export declare const conditionExtent: (base: IRange.Coords, sortRange: IRange.Coords, ref: IRange.Coords) => ISort.Extent | null;
16
+ //# sourceMappingURL=SortExtent.d.ts.map
@@ -22,6 +22,17 @@ export interface WriteXLSXOptions extends IWorkbookIO.WriteOptions {
22
22
  * what Excel's own *Save As* does.
23
23
  */
24
24
  macroEnabled?: boolean;
25
+ /**
26
+ * Whether to write a template (`.xltx`, or `.xltm` with {@link macroEnabled}) rather than a
27
+ * workbook.
28
+ *
29
+ * @defaultValue false
30
+ *
31
+ * @remarks
32
+ * Set by the format registration, like {@link macroEnabled}. Only the `xl/workbook.xml` content
33
+ * type differs; Excel opens a template as a new, unsaved workbook made from it.
34
+ */
35
+ template?: boolean;
25
36
  /**
26
37
  * Callback invoked when a part is emitted.
27
38
  *
@@ -0,0 +1,19 @@
1
+ import { ICellHeader } from '@sheetxl/sdk';
2
+ /**
3
+ * A row or column run as a sheet part carries it: the header's own state, plus the style and border
4
+ * flags xlsx keeps per row or column.
5
+ *
6
+ * @remarks
7
+ * The model has no header styles: a whole-row or whole-column style is a direct style over the whole
8
+ * row or column. The reader moves `s` there (`applyHeaderStyles`) and the writer works it out again
9
+ * (`layoutWorkbookStyles`).
10
+ */
11
+ export interface XlsxHeader extends ICellHeader.JSON {
12
+ /** `<col style>` / `<row s customFormat="1">`: an index into the workbook's direct styles. */
13
+ s?: number;
14
+ /** `<row thickTop>`: the row gives a pixel to a thick line along its top. */
15
+ tt?: boolean;
16
+ /** `<row thickBot>`: the row gives a pixel to a medium or thick line along its bottom. */
17
+ tb?: boolean;
18
+ }
19
+ //# sourceMappingURL=XlsxHeader.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { ChartModel } from '@sheetxl/sdk';
2
+ /** A chartex part as {@link readChartExSpace} reads it. */
3
+ export interface ChartExSpacePart {
4
+ model: ChartModel.ChartSpace;
5
+ /** How many elements were kept as markup because the model could not state them exactly. */
6
+ kept: number;
7
+ /** How many children the part states out of schema order (see `ChartSpacePart.reordered`). */
8
+ reordered: number;
9
+ /**
10
+ * Whether the model states something otherwise than the part does, so a part written from it
11
+ * would differ (see `_chartExFold`). The part's own markup still writes back while the chart is
12
+ * untouched.
13
+ */
14
+ lossy: boolean;
15
+ }
16
+ /**
17
+ * Reads a chartex part.
18
+ *
19
+ * @returns `null` when `xml` is not a `cx:chartSpace`.
20
+ */
21
+ export declare const readChartExSpace: (xml: string) => ChartExSpacePart | null;
22
+ /**
23
+ * Writes a chartex part.
24
+ *
25
+ * @remarks
26
+ * The chart space keeps the namespace declarations it was read with; the `cx`, `a` and `r`
27
+ * prefixes the writer uses are declared when it has none. Groups of a type the part cannot state
28
+ * are left out.
29
+ */
30
+ export declare const writeChartExSpace: (chartSpace: ChartModel.ChartSpace) => string;
31
+ /**
32
+ * The markup a chartex part is saved as: `xml` as it is while it states what `model` does, so a
33
+ * chart nothing has changed is written byte for byte; otherwise the part written from `model`.
34
+ *
35
+ * @param xml The markup the chart was read from, when the part still carries it.
36
+ */
37
+ export declare const writeChartExPart: (model: ChartModel.ChartSpace, xml: string | undefined) => string;
38
+ //# sourceMappingURL=ChartExXml.d.ts.map
@@ -0,0 +1,47 @@
1
+ import { ChartModel } from '@sheetxl/sdk';
2
+ /** The two kinds of chart part: `c:chartSpace` and `cx:chartSpace`. */
3
+ export type ChartFamily = 'chart' | 'chartEx';
4
+ /** What a part of each family is, in the package and in the frame that cites it. */
5
+ export declare const CHART_PARTS: Readonly<Record<ChartFamily, {
6
+ relType: string;
7
+ contentType: string;
8
+ /** Where the part goes, beside the sheet's drawing. */
9
+ path: string;
10
+ /** The `graphicData` uri of a frame citing the part, and the namespace of its `chart` element. */
11
+ graphicUri: string;
12
+ }>>;
13
+ /** The family of a part, by the relationship that cites it. */
14
+ export declare const familyOfPart: (relType: string | undefined) => ChartFamily | null;
15
+ /** A chart part as {@link readChartModelPart} reads it. */
16
+ export interface ChartPartRead {
17
+ model: ChartModel.ChartSpace;
18
+ family: ChartFamily;
19
+ /** Elements kept as markup because the model could not state them exactly. */
20
+ kept: number;
21
+ /** Whether a part written from the model would state something otherwise (see `_chartExFold`). */
22
+ lossy: boolean;
23
+ }
24
+ /**
25
+ * Reads a chart part of either family.
26
+ *
27
+ * @returns `null` when `xml` is neither a `c:chartSpace` nor a `cx:chartSpace`.
28
+ */
29
+ export declare const readChartModelPart: (xml: string) => ChartPartRead | null;
30
+ /** A chart part as {@link writeChartModelPart} writes it. */
31
+ export interface ChartPartWrite {
32
+ xml: string;
33
+ family: ChartFamily;
34
+ /** The types of the groups the part could not state, which are not in it. */
35
+ leftOut: string[];
36
+ }
37
+ /**
38
+ * Writes a chart's model to the part its group types belong in.
39
+ *
40
+ * @param source The part the chart was read from: its family, and its markup while it still carries
41
+ * it. That markup is written as it is while it states what the model does.
42
+ */
43
+ export declare const writeChartModelPart: (model: ChartModel.ChartSpace, source?: {
44
+ family?: ChartFamily | null;
45
+ xml?: string;
46
+ }) => ChartPartWrite;
47
+ //# sourceMappingURL=ChartPartXml.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { ChartModel } from '@sheetxl/sdk';
2
+ /** A chart part as {@link readChartSpace} reads it. */
3
+ export interface ChartSpacePart {
4
+ model: ChartModel.ChartSpace;
5
+ /** How many elements were kept as markup because the model could not state them exactly. */
6
+ kept: number;
7
+ /**
8
+ * How many children the part states out of schema order. The model holds them; written back
9
+ * they come in schema order, so such a part is the same only apart from the order of children.
10
+ */
11
+ reordered: number;
12
+ }
13
+ /**
14
+ * Reads a chart part.
15
+ *
16
+ * @returns `null` when `xml` is not a `c:chartSpace`: a `cx:chartSpace` (waterfall, treemap…) is
17
+ * read by `readChartExSpace`.
18
+ */
19
+ export declare const readChartSpace: (xml: string) => ChartSpacePart | null;
20
+ export declare const DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n";
21
+ /**
22
+ * Writes a chart part.
23
+ *
24
+ * @remarks
25
+ * The chart space keeps the namespace declarations it was read with; the `c`, `a` and `r` prefixes
26
+ * the writer uses are declared when it has none.
27
+ */
28
+ export declare const writeChartSpace: (chartSpace: ChartModel.ChartSpace) => string;
29
+ /**
30
+ * The markup a chart part is saved as: `xml` as it is while it states what `model` does, so a
31
+ * chart nothing has changed is written byte for byte; otherwise the part written from `model`. A
32
+ * part stating a label position Excel refuses is always written from `model`, which leaves it out.
33
+ *
34
+ * @param xml The markup the chart was read from, when the part still carries it.
35
+ */
36
+ export declare const writeChartPart: (model: ChartModel.ChartSpace, xml: string | undefined) => string;
37
+ //# sourceMappingURL=ChartSpaceXml.d.ts.map