@office-open/xlsx 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,12 +1,191 @@
1
1
  import { AppProperties, BaseXmlComponent, ChartCollection, ChartSpaceOptions, CompressionOptions, Context, DataType, IgnoreIfEmptyXmlComponent, OutputByType, OutputByType as OutputByType$1, OutputType, OutputType as OutputType$1, PackerOptions, ParsedArchive, Relationships } from "@office-open/core";
2
2
  import { Element } from "@office-open/xml";
3
+ import { DefaultTheme } from "@office-open/core/theme";
3
4
  import { Buffer } from "\u0000polyfill-node.buffer";
4
5
 
6
+ //#region src/file/workbook.d.ts
7
+ interface SheetDefinition {
8
+ readonly name: string;
9
+ readonly sheetId: number;
10
+ readonly rId: string;
11
+ readonly state?: "visible" | "hidden" | "veryHidden";
12
+ }
13
+ interface PivotCacheReference {
14
+ readonly cacheId: number;
15
+ readonly rId: string;
16
+ }
17
+ interface TablePartReference {
18
+ readonly rId: string;
19
+ }
20
+ interface CustomWorkbookViewOptions {
21
+ readonly name: string;
22
+ readonly guid: string;
23
+ readonly windowWidth: number;
24
+ readonly windowHeight: number;
25
+ readonly activeSheetId: number;
26
+ readonly xWindow?: number;
27
+ readonly yWindow?: number;
28
+ readonly showFormulaBar?: boolean;
29
+ readonly showStatusbar?: boolean;
30
+ readonly showHorizontalScroll?: boolean;
31
+ readonly showVerticalScroll?: boolean;
32
+ readonly showSheetTabs?: boolean;
33
+ readonly tabRatio?: number;
34
+ readonly includeHiddenRowCol?: boolean;
35
+ readonly includePrintSettings?: boolean;
36
+ readonly personalView?: boolean;
37
+ readonly maximized?: boolean;
38
+ readonly minimized?: boolean;
39
+ readonly autoUpdate?: boolean;
40
+ readonly mergeInterval?: number;
41
+ readonly changesSavedWin?: boolean;
42
+ readonly onlySync?: boolean;
43
+ readonly showComments?: string;
44
+ }
45
+ interface WorkbookProtectionOptions {
46
+ readonly lockStructure?: boolean;
47
+ readonly lockWindows?: boolean;
48
+ readonly lockRevision?: boolean;
49
+ readonly workbookPassword?: string;
50
+ readonly workbookAlgorithmName?: string;
51
+ readonly workbookHashValue?: string;
52
+ readonly workbookSaltValue?: string;
53
+ readonly workbookSpinCount?: number;
54
+ readonly revisionsPassword?: string;
55
+ readonly revisionsAlgorithmName?: string;
56
+ readonly revisionsHashValue?: string;
57
+ readonly revisionsSaltValue?: string;
58
+ readonly revisionsSpinCount?: number;
59
+ }
60
+ interface FileRecoveryPrOptions {
61
+ readonly autoRecover?: boolean;
62
+ readonly crashSave?: boolean;
63
+ readonly dataExtractLoad?: boolean;
64
+ readonly repairLoad?: boolean;
65
+ }
66
+ interface WebPublishingOptions {
67
+ readonly css?: boolean;
68
+ readonly thicket?: boolean;
69
+ readonly longFileNames?: boolean;
70
+ readonly vml?: boolean;
71
+ readonly allowPng?: boolean;
72
+ readonly targetScreenSize?: string;
73
+ readonly dpi?: number;
74
+ readonly codePage?: number;
75
+ readonly characterSet?: string;
76
+ }
77
+ interface FileSharingOptions {
78
+ readonly readOnlyRecommended?: boolean;
79
+ readonly userName?: string;
80
+ readonly reservationPassword?: string;
81
+ readonly algorithmName?: string;
82
+ readonly hashValue?: string;
83
+ readonly saltValue?: string;
84
+ readonly spinCount?: number;
85
+ }
86
+ interface WorkbookPrOptions {
87
+ readonly date1904?: boolean;
88
+ readonly defaultThemeVersion?: number;
89
+ readonly showObjects?: string;
90
+ readonly hidePivotFieldList?: boolean;
91
+ readonly allowRefreshQuery?: boolean;
92
+ readonly filterPrivacy?: boolean;
93
+ readonly backupFile?: boolean;
94
+ readonly codeName?: string;
95
+ readonly showBorderUnselectedTables?: boolean;
96
+ readonly promptedSolutions?: boolean;
97
+ readonly showInkAnnotation?: boolean;
98
+ readonly saveExternalLinkValues?: boolean;
99
+ readonly updateLinks?: string;
100
+ readonly showPivotChartFilter?: boolean;
101
+ readonly publishItems?: boolean;
102
+ readonly checkCompatibility?: boolean;
103
+ readonly autoCompressPictures?: boolean;
104
+ readonly refreshAllConnections?: boolean;
105
+ }
106
+ interface VolTypeOptions {
107
+ readonly type?: "realTimeData" | "olapFunctions";
108
+ readonly mains?: readonly VolMainOptions[];
109
+ }
110
+ interface VolMainOptions {
111
+ readonly first: string;
112
+ readonly topics?: readonly VolTopicOptions[];
113
+ }
114
+ interface VolTopicOptions {
115
+ readonly value: string;
116
+ readonly valueType?: string;
117
+ readonly stringTopics?: readonly string[];
118
+ readonly refs?: readonly VolTopicRefOptions[];
119
+ }
120
+ interface VolTopicRefOptions {
121
+ readonly reference: string;
122
+ readonly sheetIndex: number;
123
+ }
124
+ interface WebPublishObjectOptions {
125
+ readonly rId: string;
126
+ readonly destinationFile?: string;
127
+ readonly autoRepublish?: boolean;
128
+ readonly title?: string;
129
+ readonly sourceObject?: string;
130
+ readonly appName?: string;
131
+ }
132
+ interface CalcPrOptions {
133
+ readonly calcMode?: string;
134
+ readonly calcId?: number;
135
+ readonly fullCalcOnLoad?: boolean;
136
+ readonly calcOnSave?: boolean;
137
+ readonly forceFullCalc?: boolean;
138
+ readonly concurrentCalc?: boolean;
139
+ readonly concurrentManualCount?: number;
140
+ readonly iterate?: boolean;
141
+ readonly iterateCount?: number;
142
+ readonly iterateDelta?: number;
143
+ readonly refMode?: string;
144
+ readonly fullPrecision?: boolean;
145
+ readonly calcCompleted?: boolean;
146
+ }
147
+ interface WorkbookViewOptions {
148
+ readonly activeTab?: number;
149
+ readonly autoFilterDateGrouping?: boolean;
150
+ readonly firstSheet?: number;
151
+ readonly showHorizontalScroll?: boolean;
152
+ readonly showSheetTabs?: boolean;
153
+ readonly showVerticalScroll?: boolean;
154
+ readonly tabRatio?: number;
155
+ readonly windowWidth?: number;
156
+ readonly windowHeight?: number;
157
+ readonly xWindow?: number;
158
+ readonly yWindow?: number;
159
+ }
160
+ declare class WorkbookXml extends BaseXmlComponent {
161
+ private readonly sheets;
162
+ private readonly pivotCaches;
163
+ private readonly protection?;
164
+ private readonly customViews?;
165
+ private readonly fileRecoveryPr?;
166
+ private readonly functionGroupNames;
167
+ private readonly webPublishing?;
168
+ private readonly fileSharing?;
169
+ private readonly workbookPr?;
170
+ private readonly calcPr?;
171
+ private readonly bookView?;
172
+ private readonly volTypes?;
173
+ private readonly webPublishObjects?;
174
+ constructor(sheets: readonly SheetDefinition[], pivotCaches?: readonly PivotCacheReference[], protection?: WorkbookProtectionOptions, customViews?: readonly CustomWorkbookViewOptions[], fileRecoveryPr?: FileRecoveryPrOptions, functionGroups?: readonly string[], webPublishing?: WebPublishingOptions, fileSharing?: FileSharingOptions, workbookPr?: WorkbookPrOptions, calcPr?: CalcPrOptions, bookView?: WorkbookViewOptions, volTypes?: readonly VolTypeOptions[], webPublishObjects?: readonly WebPublishObjectOptions[]);
175
+ toXml(_context: Context): string;
176
+ static buildTablePartsXml(tableParts: readonly TablePartReference[]): string;
177
+ static buildExternalReferencesXml(refs: readonly {
178
+ rId: string;
179
+ }[]): string;
180
+ private hashPassword;
181
+ }
182
+ //#endregion
5
183
  //#region src/file/content-types.d.ts
6
184
  declare class ContentTypes extends BaseXmlComponent {
7
185
  private readonly dynamicEntries;
8
186
  constructor();
9
187
  addWorksheet(index: number): void;
188
+ addChartsheet(index: number): void;
10
189
  addStyles(): void;
11
190
  addSharedStrings(): void;
12
191
  addTheme(index?: number): void;
@@ -18,6 +197,14 @@ declare class ContentTypes extends BaseXmlComponent {
18
197
  addPivotTable(index: number): void;
19
198
  addPivotCacheDefinition(index: number): void;
20
199
  addPivotCacheRecords(index: number): void;
200
+ addTable(index: number): void;
201
+ addExternalLink(index: number): void;
202
+ addCalcChain(): void;
203
+ addDialogsheet(index: number): void;
204
+ addRevisionHeaders(): void;
205
+ addRevisionLog(index: number): void;
206
+ addQueryTable(index: number): void;
207
+ addMetadata(): void;
21
208
  toXml(_context: Context): string;
22
209
  }
23
210
  //#endregion
@@ -51,16 +238,6 @@ declare class Media {
51
238
  get array(): readonly MediaData[];
52
239
  }
53
240
  //#endregion
54
- //#region src/file/shared-strings.d.ts
55
- declare class SharedStrings extends BaseXmlComponent {
56
- private readonly strings;
57
- private readonly indexMap;
58
- constructor();
59
- register(s: string): number;
60
- get count(): number;
61
- toXml(_context: Context): string;
62
- }
63
- //#endregion
64
241
  //#region src/file/styles.d.ts
65
242
  interface FontOptions {
66
243
  readonly bold?: boolean;
@@ -70,15 +247,37 @@ interface FontOptions {
70
247
  readonly size?: number;
71
248
  readonly color?: string;
72
249
  readonly fontName?: string;
250
+ readonly charset?: number;
251
+ readonly family?: number;
252
+ readonly condense?: boolean;
253
+ readonly extend?: boolean;
254
+ readonly vertAlign?: "superscript" | "subscript" | "baseline";
255
+ readonly scheme?: "major" | "minor" | "none";
256
+ readonly shadow?: boolean;
257
+ readonly outline?: boolean;
258
+ }
259
+ interface GradientStopOptions {
260
+ readonly position: number;
261
+ readonly color: string;
73
262
  }
74
263
  interface FillOptions {
75
- readonly type?: "solid" | "pattern";
264
+ readonly type?: "solid" | "pattern" | "gradient";
76
265
  readonly color?: string;
77
266
  readonly patternType?: string;
267
+ readonly bgColor?: string;
268
+ readonly stops?: readonly GradientStopOptions[];
269
+ readonly gradientType?: "linear" | "path";
270
+ readonly gradientDegree?: number;
271
+ readonly gradientLeft?: number;
272
+ readonly gradientRight?: number;
273
+ readonly gradientTop?: number;
274
+ readonly gradientBottom?: number;
78
275
  }
79
276
  interface BorderOptions {
80
277
  readonly style?: "thin" | "medium" | "thick" | "dotted" | "dashed" | "hair" | "none";
81
278
  readonly color?: string;
279
+ readonly diagonalUp?: boolean;
280
+ readonly diagonalDown?: boolean;
82
281
  }
83
282
  interface BorderSideOptions {
84
283
  readonly top?: BorderOptions;
@@ -86,6 +285,10 @@ interface BorderSideOptions {
86
285
  readonly left?: BorderOptions;
87
286
  readonly right?: BorderOptions;
88
287
  readonly diagonal?: BorderOptions;
288
+ readonly start?: BorderOptions;
289
+ readonly end?: BorderOptions;
290
+ readonly vertical?: BorderOptions;
291
+ readonly horizontal?: BorderOptions;
89
292
  }
90
293
  interface AlignmentOptions {
91
294
  readonly horizontal?: "left" | "center" | "right" | "fill" | "justify";
@@ -93,6 +296,10 @@ interface AlignmentOptions {
93
296
  readonly wrapText?: boolean;
94
297
  readonly textRotation?: number;
95
298
  readonly indent?: number;
299
+ readonly relativeIndent?: number;
300
+ readonly justifyLastLine?: boolean;
301
+ readonly shrinkToFit?: boolean;
302
+ readonly readingOrder?: number;
96
303
  }
97
304
  interface StyleOptions {
98
305
  readonly font?: FontOptions;
@@ -100,6 +307,20 @@ interface StyleOptions {
100
307
  readonly border?: BorderSideOptions;
101
308
  readonly numFmt?: string;
102
309
  readonly alignment?: AlignmentOptions;
310
+ readonly quotePrefix?: boolean;
311
+ readonly pivotButton?: boolean;
312
+ readonly protection?: CellProtectionOptions;
313
+ }
314
+ interface CellProtectionOptions {
315
+ readonly locked?: boolean;
316
+ readonly hidden?: boolean;
317
+ }
318
+ interface IndexedColorOptions {
319
+ readonly rgb: string;
320
+ }
321
+ interface ColorsOptions {
322
+ readonly indexedColors?: readonly IndexedColorOptions[];
323
+ readonly mruColors?: readonly string[];
103
324
  }
104
325
  interface DxfOptions {
105
326
  readonly font?: FontOptions;
@@ -107,6 +328,21 @@ interface DxfOptions {
107
328
  readonly border?: BorderSideOptions;
108
329
  readonly numFmt?: string;
109
330
  }
331
+ type TableStyleElementType = "wholeTable" | "headerRow" | "totalRow" | "firstColumn" | "lastColumn" | "firstRowStripe" | "secondRowStripe" | "firstColumnStripe" | "secondColumnStripe" | "firstHeaderCell" | "lastHeaderCell" | "firstTotalCell" | "lastTotalCell" | "subtotalRow1" | "subtotalRow2" | "subtotalRow3" | "subtotalColumn1" | "subtotalColumn2" | "subtotalColumn3" | "blankRow" | "firstColumnSubheading" | "secondColumnSubheading" | "thirdColumnSubheading" | "firstRowSubheading" | "secondRowSubheading" | "thirdRowSubheading" | "pageFieldLabels" | "pageFieldValues";
332
+ interface TableStyleElementOptions {
333
+ readonly type: TableStyleElementType;
334
+ readonly dxfId?: number;
335
+ readonly button?: boolean;
336
+ }
337
+ interface StyleExtensionOptions {
338
+ readonly uri: string;
339
+ readonly content?: string;
340
+ }
341
+ interface CustomTableStyleOptions {
342
+ readonly name: string;
343
+ readonly pivot?: boolean;
344
+ readonly elements?: readonly TableStyleElementOptions[];
345
+ }
110
346
  declare class Styles extends BaseXmlComponent {
111
347
  private readonly fonts;
112
348
  private readonly fontKeys;
@@ -119,9 +355,15 @@ declare class Styles extends BaseXmlComponent {
119
355
  private readonly cellXfs;
120
356
  private readonly cellXfKeys;
121
357
  private readonly dxfs;
358
+ private colors?;
359
+ private tableStyles?;
360
+ private styleExtensions?;
122
361
  constructor();
123
362
  register(opts: StyleOptions): number;
124
363
  registerDxf(opts: DxfOptions): number;
364
+ setColors(opts: ColorsOptions): void;
365
+ setTableStyles(styles: readonly CustomTableStyleOptions[]): void;
366
+ setExtensions(extensions: readonly StyleExtensionOptions[]): void;
125
367
  private registerFont;
126
368
  private registerFill;
127
369
  private registerBorder;
@@ -131,30 +373,7 @@ declare class Styles extends BaseXmlComponent {
131
373
  private fontXmlStr;
132
374
  private borderXmlStr;
133
375
  private alignmentXmlStr;
134
- }
135
- //#endregion
136
- //#region src/file/theme.d.ts
137
- declare class DefaultTheme extends BaseXmlComponent {
138
- constructor();
139
- toXml(_context: Context): string;
140
- }
141
- //#endregion
142
- //#region src/file/workbook.d.ts
143
- interface SheetDefinition {
144
- readonly name: string;
145
- readonly sheetId: number;
146
- readonly rId: string;
147
- readonly state?: "visible" | "hidden" | "veryHidden";
148
- }
149
- interface PivotCacheReference {
150
- readonly cacheId: number;
151
- readonly rId: string;
152
- }
153
- declare class WorkbookXml extends BaseXmlComponent {
154
- private readonly sheets;
155
- private readonly pivotCaches;
156
- constructor(sheets: readonly SheetDefinition[], pivotCaches?: readonly PivotCacheReference[]);
157
- toXml(_context: Context): string;
376
+ private protectionXmlStr;
158
377
  }
159
378
  //#endregion
160
379
  //#region src/file/pivot/pivot-utils.d.ts
@@ -176,6 +395,92 @@ interface PivotDataField {
176
395
  readonly field: string;
177
396
  readonly summarize?: ConsolidateFunction;
178
397
  readonly name?: string;
398
+ readonly showDataAs?: string;
399
+ readonly baseField?: number;
400
+ readonly baseItem?: number;
401
+ readonly sortByTupleItems?: readonly number[];
402
+ }
403
+ declare const PivotFilterType: {
404
+ readonly UNKNOWN: "unknown";
405
+ readonly COUNT: "count";
406
+ readonly PERCENT: "percent";
407
+ readonly SUM: "sum";
408
+ readonly CAPTION_EQUAL: "captionEqual";
409
+ readonly CAPTION_NOT_EQUAL: "captionNotEqual";
410
+ readonly CAPTION_BEGINS_WITH: "captionBeginsWith";
411
+ readonly CAPTION_NOT_BEGINS_WITH: "captionNotBeginsWith";
412
+ readonly CAPTION_ENDS_WITH: "captionEndsWith";
413
+ readonly CAPTION_NOT_ENDS_WITH: "captionNotEndsWith";
414
+ readonly CAPTION_CONTAINS: "captionContains";
415
+ readonly CAPTION_NOT_CONTAINS: "captionNotContains";
416
+ readonly CAPTION_GREATER_THAN: "captionGreaterThan";
417
+ readonly CAPTION_GREATER_THAN_OR_EQUAL: "captionGreaterThanOrEqual";
418
+ readonly CAPTION_LESS_THAN: "captionLessThan";
419
+ readonly CAPTION_LESS_THAN_OR_EQUAL: "captionLessThanOrEqual";
420
+ readonly CAPTION_BETWEEN: "captionBetween";
421
+ readonly CAPTION_NOT_BETWEEN: "captionNotBetween";
422
+ readonly VALUE_EQUAL: "valueEqual";
423
+ readonly VALUE_NOT_EQUAL: "valueNotEqual";
424
+ readonly VALUE_GREATER_THAN: "valueGreaterThan";
425
+ readonly VALUE_GREATER_THAN_OR_EQUAL: "valueGreaterThanOrEqual";
426
+ readonly VALUE_LESS_THAN: "valueLessThan";
427
+ readonly VALUE_LESS_THAN_OR_EQUAL: "valueLessThanOrEqual";
428
+ readonly VALUE_BETWEEN: "valueBetween";
429
+ readonly VALUE_NOT_BETWEEN: "valueNotBetween";
430
+ readonly DATE_EQUAL: "dateEqual";
431
+ readonly DATE_NOT_EQUAL: "dateNotEqual";
432
+ readonly DATE_OLDER_THAN: "dateOlderThan";
433
+ readonly DATE_OLDER_THAN_OR_EQUAL: "dateOlderThanOrEqual";
434
+ readonly DATE_NEWER_THAN: "dateNewerThan";
435
+ readonly DATE_NEWER_THAN_OR_EQUAL: "dateNewerThanOrEqual";
436
+ readonly DATE_BETWEEN: "dateBetween";
437
+ readonly DATE_NOT_BETWEEN: "dateNotBetween";
438
+ readonly TOMORROW: "tomorrow";
439
+ readonly TODAY: "today";
440
+ readonly YESTERDAY: "yesterday";
441
+ readonly NEXT_WEEK: "nextWeek";
442
+ readonly THIS_WEEK: "thisWeek";
443
+ readonly LAST_WEEK: "lastWeek";
444
+ readonly NEXT_MONTH: "nextMonth";
445
+ readonly THIS_MONTH: "thisMonth";
446
+ readonly LAST_MONTH: "lastMonth";
447
+ readonly NEXT_QUARTER: "nextQuarter";
448
+ readonly THIS_QUARTER: "thisQuarter";
449
+ readonly LAST_QUARTER: "lastQuarter";
450
+ readonly NEXT_YEAR: "nextYear";
451
+ readonly THIS_YEAR: "thisYear";
452
+ readonly LAST_YEAR: "lastYear";
453
+ readonly YEAR_TO_DATE: "yearToDate";
454
+ readonly Q1: "Q1";
455
+ readonly Q2: "Q2";
456
+ readonly Q3: "Q3";
457
+ readonly Q4: "Q4";
458
+ readonly M1: "M1";
459
+ readonly M2: "M2";
460
+ readonly M3: "M3";
461
+ readonly M4: "M4";
462
+ readonly M5: "M5";
463
+ readonly M6: "M6";
464
+ readonly M7: "M7";
465
+ readonly M8: "M8";
466
+ readonly M9: "M9";
467
+ readonly M10: "M10";
468
+ readonly M11: "M11";
469
+ readonly M12: "M12";
470
+ };
471
+ type PivotFilterType = (typeof PivotFilterType)[keyof typeof PivotFilterType];
472
+ interface PivotFilterOptions {
473
+ readonly fld: number;
474
+ readonly type: PivotFilterType;
475
+ readonly id: number;
476
+ readonly mpFld?: number;
477
+ readonly evalOrder?: number;
478
+ readonly iMeasureHier?: number;
479
+ readonly iMeasureFld?: number;
480
+ readonly name?: string;
481
+ readonly description?: string;
482
+ readonly stringValue1?: string;
483
+ readonly stringValue2?: string;
179
484
  }
180
485
  interface PivotTableOptions {
181
486
  readonly name?: string;
@@ -186,6 +491,214 @@ interface PivotTableOptions {
186
491
  readonly columns?: readonly string[];
187
492
  readonly data: readonly PivotDataField[];
188
493
  readonly style?: string;
494
+ readonly filters?: readonly PivotFilterOptions[];
495
+ readonly pages?: readonly string[];
496
+ readonly dataOnRows?: boolean;
497
+ readonly grandTotalCaption?: string;
498
+ readonly errorCaption?: string;
499
+ readonly showError?: boolean;
500
+ readonly missingCaption?: string;
501
+ readonly showMissing?: boolean;
502
+ readonly pageStyle?: string;
503
+ readonly pivotTableStyle?: string;
504
+ readonly tag?: string;
505
+ readonly showItems?: boolean;
506
+ readonly editData?: boolean;
507
+ readonly disableFieldList?: boolean;
508
+ readonly showCalcMbrs?: boolean;
509
+ readonly visualTotals?: boolean;
510
+ readonly showMultipleLabel?: boolean;
511
+ readonly showDataDropDown?: boolean;
512
+ readonly showDrill?: boolean;
513
+ readonly printDrill?: boolean;
514
+ readonly showMemberPropertyTips?: boolean;
515
+ readonly showDataTips?: boolean;
516
+ readonly enableWizard?: boolean;
517
+ readonly enableDrill?: boolean;
518
+ readonly enableFieldProperties?: boolean;
519
+ readonly pageWrap?: number;
520
+ readonly pageOverThenDown?: boolean;
521
+ readonly subtotalHiddenItems?: boolean;
522
+ readonly fieldPrintTitles?: boolean;
523
+ readonly mergeItem?: boolean;
524
+ readonly showDropZones?: boolean;
525
+ readonly showEmptyRow?: boolean;
526
+ readonly showEmptyCol?: boolean;
527
+ readonly showHeaders?: boolean;
528
+ readonly published?: boolean;
529
+ readonly gridDropZones?: boolean;
530
+ readonly multipleFieldFilters?: boolean;
531
+ readonly rowHeaderCaption?: string;
532
+ readonly colHeaderCaption?: string;
533
+ readonly fieldListSortAscending?: boolean;
534
+ readonly mdxSubqueries?: boolean;
535
+ readonly customListSort?: boolean;
536
+ readonly calculatedItems?: readonly CalculatedItemOptions[];
537
+ readonly calculatedMembers?: readonly CalculatedMemberOptions[];
538
+ readonly pivotHierarchies?: readonly PivotHierarchyOptions[];
539
+ readonly pivotConditionalFormats?: readonly PivotConditionalFormatOptions[];
540
+ readonly chartFormats?: readonly ChartFormatOptions[];
541
+ readonly autoSortScope?: PivotAreaOptions;
542
+ readonly memberProperties?: readonly MemberPropertyOptions[];
543
+ readonly formats?: readonly PivotFormatOptions[];
544
+ readonly rowHierarchiesUsage?: readonly HierarchyUsageOptions[];
545
+ readonly colHierarchiesUsage?: readonly HierarchyUsageOptions[];
546
+ }
547
+ interface PivotFormatOptions {
548
+ readonly action?: "formatting" | "drill" | "formula" | "blank" | "subtotal" | "report";
549
+ readonly dxfId?: number;
550
+ readonly pivotArea: PivotAreaOptions;
551
+ }
552
+ interface CalculatedItemOptions {
553
+ readonly field?: number;
554
+ readonly formula?: string;
555
+ readonly pivotArea?: PivotAreaOptions;
556
+ }
557
+ interface CalculatedMemberOptions {
558
+ readonly name: string;
559
+ readonly mdx: string;
560
+ readonly memberName?: string;
561
+ readonly hierarchy?: string;
562
+ readonly parent?: string;
563
+ readonly solveOrder?: number;
564
+ readonly set?: boolean;
565
+ }
566
+ interface PivotHierarchyOptions {
567
+ readonly outline?: boolean;
568
+ readonly multipleItemSelectionAllowed?: boolean;
569
+ readonly subtotalTop?: boolean;
570
+ readonly showInFieldList?: boolean;
571
+ readonly dragToRow?: boolean;
572
+ readonly dragToCol?: boolean;
573
+ readonly dragToPage?: boolean;
574
+ readonly dragToData?: boolean;
575
+ readonly dragOff?: boolean;
576
+ readonly includeNewItemsInFilter?: boolean;
577
+ readonly caption?: string;
578
+ readonly members?: readonly MemberOptions[];
579
+ readonly memberProperties?: readonly MemberPropertyOptions[];
580
+ }
581
+ interface MemberOptions {
582
+ readonly name: string;
583
+ }
584
+ interface MemberPropertyOptions {
585
+ readonly field: number;
586
+ readonly name?: string;
587
+ readonly showCell?: boolean;
588
+ readonly showTip?: boolean;
589
+ }
590
+ interface PivotAreaOptions {
591
+ readonly field?: number;
592
+ readonly type?: "none" | "normal" | "data" | "all" | "origin" | "button" | "topEnd" | "topRight";
593
+ readonly dataOnly?: boolean;
594
+ readonly labelOnly?: boolean;
595
+ readonly grandRow?: boolean;
596
+ readonly grandCol?: boolean;
597
+ readonly cacheIndex?: boolean;
598
+ readonly outline?: boolean;
599
+ readonly offset?: string;
600
+ readonly collapsedLevelsAreSubtotals?: boolean;
601
+ readonly axis?: "axisRow" | "axisCol" | "axisPage" | "axisValues";
602
+ readonly fieldPosition?: number;
603
+ readonly references?: readonly PivotAreaReferenceOptions[];
604
+ }
605
+ interface PivotAreaReferenceOptions {
606
+ readonly field?: number;
607
+ readonly count?: number;
608
+ readonly selected?: boolean;
609
+ readonly byPosition?: boolean;
610
+ readonly relative?: boolean;
611
+ readonly defaultSubtotal?: boolean;
612
+ readonly sumSubtotal?: boolean;
613
+ readonly countASubtotal?: boolean;
614
+ readonly avgSubtotal?: boolean;
615
+ readonly maxSubtotal?: boolean;
616
+ readonly minSubtotal?: boolean;
617
+ readonly x?: readonly number[];
618
+ }
619
+ interface PivotConditionalFormatOptions {
620
+ readonly scope?: "selection" | "data" | "field";
621
+ readonly type?: "none" | "all" | "row" | "column";
622
+ readonly priority: number;
623
+ readonly pivotAreas?: readonly PivotAreaOptions[];
624
+ }
625
+ interface ChartFormatOptions {
626
+ readonly chart: number;
627
+ readonly format: number;
628
+ readonly series?: boolean;
629
+ readonly pivotArea?: PivotAreaOptions;
630
+ }
631
+ interface HierarchyUsageOptions {
632
+ readonly hierarchyUsage: number;
633
+ }
634
+ //#endregion
635
+ //#region src/file/table/table-xml.d.ts
636
+ declare const TotalsRowFunction: {
637
+ readonly NONE: "none";
638
+ readonly SUM: "sum";
639
+ readonly MIN: "min";
640
+ readonly MAX: "max";
641
+ readonly AVERAGE: "average";
642
+ readonly COUNT: "count";
643
+ readonly COUNT_NUMS: "countNums";
644
+ readonly STD_DEV: "stdDev";
645
+ readonly VAR: "var";
646
+ readonly CUSTOM: "custom";
647
+ };
648
+ type TotalsRowFunction = (typeof TotalsRowFunction)[keyof typeof TotalsRowFunction];
649
+ declare const TableType: {
650
+ readonly WORKSHEET: "worksheet";
651
+ readonly XML: "xml";
652
+ readonly QUERY_TABLE: "queryTable";
653
+ };
654
+ type TableType = (typeof TableType)[keyof typeof TableType];
655
+ interface TableStyleInfoOptions {
656
+ readonly name?: string;
657
+ readonly showFirstColumn?: boolean;
658
+ readonly showLastColumn?: boolean;
659
+ readonly showRowStripes?: boolean;
660
+ readonly showColumnStripes?: boolean;
661
+ }
662
+ interface TableColumnOptions {
663
+ readonly name: string;
664
+ readonly totalsRowFunction?: TotalsRowFunction;
665
+ readonly totalsRowLabel?: string;
666
+ readonly calculatedColumnFormula?: string;
667
+ readonly totalsRowFormula?: string;
668
+ readonly totalsRowFormulaArray?: boolean;
669
+ readonly calculatedColumnFormulaArray?: boolean;
670
+ readonly uniqueName?: string;
671
+ readonly queryTableFieldId?: number;
672
+ readonly headerRowDxfId?: number;
673
+ readonly dataDxfId?: number;
674
+ readonly totalsRowDxfId?: number;
675
+ readonly headerRowCellStyle?: string;
676
+ readonly dataCellStyle?: string;
677
+ readonly totalsRowCellStyle?: string;
678
+ }
679
+ interface TableOptions {
680
+ readonly id: number;
681
+ readonly name?: string;
682
+ readonly displayName: string;
683
+ readonly ref: string;
684
+ readonly columns: readonly TableColumnOptions[];
685
+ readonly headerRowCount?: number;
686
+ readonly totalsRowCount?: number;
687
+ readonly totalsRowShown?: boolean;
688
+ readonly tableType?: TableType;
689
+ readonly style?: TableStyleInfoOptions;
690
+ readonly autoFilter?: string;
691
+ readonly insertRowShift?: boolean;
692
+ readonly published?: boolean;
693
+ readonly headerRowDxfId?: number;
694
+ readonly dataDxfId?: number;
695
+ readonly totalsRowDxfId?: number;
696
+ readonly headerRowBorderDxfId?: number;
697
+ readonly tableBorderDxfId?: number;
698
+ readonly totalsRowBorderDxfId?: number;
699
+ readonly headerRowCellStyle?: string;
700
+ readonly dataCellStyle?: string;
701
+ readonly totalsRowCellStyle?: string;
189
702
  }
190
703
  //#endregion
191
704
  //#region src/file/worksheet.d.ts
@@ -197,15 +710,53 @@ interface ColumnOptions {
197
710
  readonly customWidth?: boolean;
198
711
  readonly outlineLevel?: number;
199
712
  readonly collapsed?: boolean;
713
+ readonly bestFit?: boolean;
714
+ readonly phonetic?: boolean;
200
715
  }
201
716
  interface RowOptions {
202
717
  readonly cells?: readonly CellOptions[];
203
718
  readonly height?: number;
204
719
  readonly hidden?: boolean;
205
720
  readonly rowNumber?: number;
721
+ readonly spans?: string;
722
+ readonly customFormat?: boolean;
723
+ readonly thickTop?: boolean;
724
+ readonly thickBot?: boolean;
725
+ readonly ph?: boolean;
726
+ }
727
+ interface RichTextRunPrOptions {
728
+ readonly font?: string;
729
+ readonly charset?: number;
730
+ readonly family?: number;
731
+ readonly bold?: boolean;
732
+ readonly italic?: boolean;
733
+ readonly strike?: boolean;
734
+ readonly outline?: boolean;
735
+ readonly shadow?: boolean;
736
+ readonly condense?: boolean;
737
+ readonly extend?: boolean;
738
+ readonly color?: string;
739
+ readonly size?: number;
740
+ readonly underline?: "single" | "double" | "singleAccounting" | "doubleAccounting" | "none";
741
+ readonly vertAlign?: "superscript" | "subscript" | "baseline";
742
+ readonly scheme?: "major" | "minor" | "none";
743
+ }
744
+ interface RichTextRunOptions {
745
+ readonly properties?: RichTextRunPrOptions;
746
+ readonly text: string;
747
+ }
748
+ interface PhoneticRunOptions {
749
+ readonly sb: number;
750
+ readonly eb: number;
751
+ readonly text: string;
752
+ }
753
+ interface RichTextOptions {
754
+ readonly text?: string;
755
+ readonly runs?: readonly RichTextRunOptions[];
756
+ readonly phonetics?: readonly PhoneticRunOptions[];
206
757
  }
207
758
  interface CellOptions {
208
- readonly value?: string | number | boolean | Date | null;
759
+ readonly value?: string | number | boolean | Date | RichTextOptions | null;
209
760
  readonly reference?: string;
210
761
  readonly styleIndex?: number;
211
762
  readonly style?: StyleOptions;
@@ -222,6 +773,34 @@ interface FormulaOptions {
222
773
  readonly type?: FormulaType;
223
774
  readonly reference?: string;
224
775
  readonly sharedIndex?: number;
776
+ readonly aca?: boolean;
777
+ readonly dt2D?: boolean;
778
+ readonly dtr?: boolean;
779
+ readonly del1?: boolean;
780
+ readonly del2?: boolean;
781
+ readonly r1?: string;
782
+ readonly r2?: string;
783
+ readonly ca?: boolean;
784
+ readonly bx?: boolean;
785
+ }
786
+ interface ScenarioCellOptions {
787
+ readonly r: string;
788
+ readonly val: string | number;
789
+ readonly deleted?: boolean;
790
+ }
791
+ interface ScenarioDefinition {
792
+ readonly name: string;
793
+ readonly inputCells: readonly ScenarioCellOptions[];
794
+ readonly count?: number;
795
+ readonly user?: string;
796
+ readonly comment?: string;
797
+ readonly hidden?: boolean;
798
+ readonly locked?: boolean;
799
+ }
800
+ interface ScenarioOptions {
801
+ readonly scenarios: readonly ScenarioDefinition[];
802
+ readonly current?: number;
803
+ readonly show?: number;
225
804
  }
226
805
  interface MergeCellOptions {
227
806
  readonly from: {
@@ -235,6 +814,10 @@ interface MergeCellOptions {
235
814
  }
236
815
  interface SheetProtectionOptions {
237
816
  readonly password?: string;
817
+ readonly algorithmName?: string;
818
+ readonly hashValue?: string;
819
+ readonly saltValue?: string;
820
+ readonly spinCount?: number;
238
821
  readonly sheet?: boolean;
239
822
  readonly objects?: boolean;
240
823
  readonly scenarios?: boolean;
@@ -252,6 +835,16 @@ interface SheetProtectionOptions {
252
835
  readonly pivotTables?: boolean;
253
836
  readonly selectUnlockedCells?: boolean;
254
837
  }
838
+ interface ProtectedRangeOptions {
839
+ readonly sqref: string;
840
+ readonly name: string;
841
+ readonly password?: string;
842
+ readonly algorithmName?: string;
843
+ readonly hashValue?: string;
844
+ readonly saltValue?: string;
845
+ readonly spinCount?: number;
846
+ readonly securityDescriptor?: string;
847
+ }
255
848
  interface FreezePaneOptions {
256
849
  readonly row?: number;
257
850
  readonly col?: number;
@@ -273,6 +866,37 @@ interface SheetViewOptions {
273
866
  readonly zoomScale?: number;
274
867
  readonly tabSelected?: boolean;
275
868
  readonly rightToLeft?: boolean;
869
+ readonly windowProtection?: boolean;
870
+ readonly showFormulas?: boolean;
871
+ readonly showRuler?: boolean;
872
+ readonly showOutlineSymbols?: boolean;
873
+ readonly defaultGridColor?: boolean;
874
+ readonly showWhiteSpace?: boolean;
875
+ readonly view?: "normal" | "pageBreakPreview" | "pageLayout";
876
+ readonly colorId?: number;
877
+ readonly zoomScaleNormal?: number;
878
+ readonly zoomScaleSheetLayoutView?: number;
879
+ readonly zoomScalePageLayoutView?: number;
880
+ readonly pivotSelections?: readonly PivotSelectionOptions[];
881
+ }
882
+ interface PivotSelectionOptions {
883
+ readonly pane?: "bottomRight" | "topRight" | "bottomLeft" | "topLeft";
884
+ readonly showHeader?: boolean;
885
+ readonly label?: boolean;
886
+ readonly data?: boolean;
887
+ readonly extendable?: boolean;
888
+ readonly count?: number;
889
+ readonly axis?: "axisRow" | "axisCol" | "axisPage" | "axisValues";
890
+ readonly dimension?: number;
891
+ readonly start?: number;
892
+ readonly min?: number;
893
+ readonly max?: number;
894
+ readonly activeRow?: number;
895
+ readonly activeCol?: number;
896
+ readonly previousRow?: number;
897
+ readonly previousCol?: number;
898
+ readonly click?: number;
899
+ readonly rId?: string;
276
900
  }
277
901
  type HyperlinkTarget = {
278
902
  readonly type: "external";
@@ -296,6 +920,8 @@ interface HeaderFooterOptions {
296
920
  readonly firstFooter?: string;
297
921
  readonly differentOddEven?: boolean;
298
922
  readonly differentFirst?: boolean;
923
+ readonly scaleWithDoc?: boolean;
924
+ readonly alignWithMargins?: boolean;
299
925
  }
300
926
  type PageOrientation = "default" | "portrait" | "landscape";
301
927
  interface PageSetupOptions {
@@ -307,16 +933,43 @@ interface PageSetupOptions {
307
933
  readonly pageOrder?: "downThenOver" | "overThenDown";
308
934
  readonly useFirstPageNumber?: boolean;
309
935
  readonly firstPageNumber?: number;
936
+ readonly paperHeight?: number;
937
+ readonly paperWidth?: number;
938
+ readonly usePrinterDefaults?: boolean;
939
+ readonly blackAndWhite?: boolean;
940
+ readonly draft?: boolean;
941
+ readonly cellComments?: "none" | "asDisplayed" | "atEnd";
942
+ readonly errors?: "displayed" | "blank" | "dash" | "NA";
310
943
  }
311
944
  interface TabColorOptions {
312
945
  readonly rgb?: string;
313
946
  readonly theme?: number;
314
947
  readonly tint?: number;
315
948
  }
949
+ interface ObjectAnchorOptions {
950
+ readonly moveWithCells?: boolean;
951
+ readonly sizeWithCells?: boolean;
952
+ }
953
+ interface CommentPrOptions {
954
+ readonly locked?: boolean;
955
+ readonly defaultSize?: boolean;
956
+ readonly print?: boolean;
957
+ readonly disabled?: boolean;
958
+ readonly autoFill?: boolean;
959
+ readonly autoLine?: boolean;
960
+ readonly altText?: string;
961
+ readonly textHAlign?: "left" | "center" | "right" | "justify" | "distributed";
962
+ readonly textVAlign?: "top" | "center" | "bottom" | "justify" | "distributed";
963
+ readonly lockText?: boolean;
964
+ readonly justLastX?: boolean;
965
+ readonly autoScale?: boolean;
966
+ readonly anchor?: ObjectAnchorOptions;
967
+ }
316
968
  interface CommentOptions {
317
969
  readonly cell: string;
318
970
  readonly author: string;
319
- readonly text: string;
971
+ readonly text: string | RichTextOptions;
972
+ readonly commentPr?: CommentPrOptions;
320
973
  }
321
974
  type DataValidationType = "none" | "whole" | "decimal" | "list" | "date" | "time" | "textLength" | "custom";
322
975
  type DataValidationOperator = "between" | "notBetween" | "equal" | "notEqual" | "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual";
@@ -333,15 +986,50 @@ interface DataValidationOptions {
333
986
  readonly showInputMessage?: boolean;
334
987
  readonly promptTitle?: string;
335
988
  readonly prompt?: string;
989
+ readonly errorStyle?: "stop" | "warning" | "information";
990
+ readonly imeMode?: "noControl" | "on" | "off" | "disabled" | "hiragana" | "fullKatakana" | "halfKatakana" | "fullAlpha" | "halfAlpha" | "fullHangul" | "halfHangul";
991
+ readonly showDropDown?: boolean;
336
992
  }
337
- type ConditionalFormatType = "cellIs" | "containsText" | "expression" | "top10" | "aboveAverage";
993
+ type ConditionalFormatType = "cellIs" | "containsText" | "expression" | "top10" | "aboveAverage" | "colorScale" | "dataBar" | "iconSet";
338
994
  type ConditionalFormatOperator = "lessThan" | "lessThanOrEqual" | "equal" | "notEqual" | "greaterThanOrEqual" | "greaterThan" | "between" | "notBetween" | "containsText" | "notContains" | "beginsWith" | "endsWith";
995
+ type CfvoType = "num" | "percent" | "max" | "min" | "formula" | "percentile";
996
+ interface CfvoOptions {
997
+ readonly type: CfvoType;
998
+ readonly val?: string | number;
999
+ readonly gte?: boolean;
1000
+ }
1001
+ type IconSetType = "3Arrows" | "3ArrowsGray" | "3Flags" | "3TrafficLights1" | "3TrafficLights2" | "3Signs" | "3Symbols" | "3Symbols2" | "4Arrows" | "4ArrowsGray" | "4RedToBlack" | "4Rating" | "4TrafficLights" | "5Arrows" | "5ArrowsGray" | "5Rating" | "5Quarters";
1002
+ interface ColorScaleOptions {
1003
+ readonly cfvo: readonly CfvoOptions[];
1004
+ readonly colors: readonly string[];
1005
+ }
1006
+ interface DataBarOptions {
1007
+ readonly cfvo: readonly [CfvoOptions, CfvoOptions];
1008
+ readonly color: string;
1009
+ readonly minLength?: number;
1010
+ readonly maxLength?: number;
1011
+ readonly showValue?: boolean;
1012
+ }
1013
+ interface IconSetOptions {
1014
+ readonly cfvo: readonly CfvoOptions[];
1015
+ readonly iconSet?: IconSetType;
1016
+ readonly showValue?: boolean;
1017
+ readonly percent?: boolean;
1018
+ readonly reverse?: boolean;
1019
+ }
339
1020
  interface ConditionalFormatRule {
340
1021
  readonly type: ConditionalFormatType;
341
1022
  readonly operator?: ConditionalFormatOperator;
342
1023
  readonly formulas?: readonly string[];
343
1024
  readonly priority?: number;
344
1025
  readonly dxfId?: number;
1026
+ readonly colorScale?: ColorScaleOptions;
1027
+ readonly dataBar?: DataBarOptions;
1028
+ readonly iconSet?: IconSetOptions;
1029
+ readonly stopIfTrue?: boolean;
1030
+ readonly timePeriod?: "today" | "yesterday" | "tomorrow" | "last7Days" | "thisMonth" | "lastMonth" | "nextMonth" | "thisWeek" | "lastWeek" | "nextWeek";
1031
+ readonly rank?: number;
1032
+ readonly equalAverage?: boolean;
345
1033
  }
346
1034
  interface ConditionalFormatOptions {
347
1035
  readonly sqref: string;
@@ -363,12 +1051,165 @@ interface CustomFilterOptions {
363
1051
  interface SortCondition {
364
1052
  readonly ref: string;
365
1053
  readonly descending?: boolean;
1054
+ readonly sortBy?: "value" | "cellColor" | "fontColor" | "icon";
1055
+ readonly customList?: string;
1056
+ readonly iconId?: number;
366
1057
  }
367
1058
  interface AutoFilterOptions {
368
1059
  readonly ref: string;
369
1060
  readonly top10?: readonly Top10FilterOptions[];
370
1061
  readonly customFilters?: readonly CustomFilterOptions[];
371
1062
  readonly sort?: readonly SortCondition[];
1063
+ readonly sortState?: SortStateOptions;
1064
+ readonly colorFilters?: readonly ColorFilterOptions[];
1065
+ readonly iconFilters?: readonly IconFilterOptions[];
1066
+ readonly dynamicFilters?: readonly DynamicFilterOptions[];
1067
+ readonly dateGroupItems?: readonly DateGroupFilterOptions[];
1068
+ }
1069
+ interface ColorFilterOptions {
1070
+ readonly colId: number;
1071
+ readonly dxfId?: number;
1072
+ readonly cellColor?: boolean;
1073
+ }
1074
+ interface IconFilterOptions {
1075
+ readonly colId: number;
1076
+ readonly iconSet: number;
1077
+ readonly iconId?: number;
1078
+ }
1079
+ interface DynamicFilterOptions {
1080
+ readonly colId: number;
1081
+ readonly type: "null" | "aboveAverage" | "belowAverage" | "tomorrow" | "today" | "yesterday" | "nextWeek" | "thisWeek" | "lastWeek" | "nextMonth" | "thisMonth" | "lastMonth" | "nextQuarter" | "thisQuarter" | "lastQuarter" | "nextYear" | "thisYear" | "lastYear" | "yearToDate" | "Q1" | "Q2" | "Q3" | "Q4" | "M1" | "M2" | "M3" | "M4" | "M5" | "M6" | "M7" | "M8" | "M9" | "M10" | "M11" | "M12";
1082
+ readonly val?: number;
1083
+ readonly maxVal?: number;
1084
+ }
1085
+ interface DateGroupFilterOptions {
1086
+ readonly colId: number;
1087
+ readonly dateTimeGrouping: "year" | "month" | "day" | "hour" | "minute" | "second";
1088
+ readonly year?: number;
1089
+ readonly month?: number;
1090
+ readonly day?: number;
1091
+ readonly hour?: number;
1092
+ readonly minute?: number;
1093
+ readonly second?: number;
1094
+ }
1095
+ interface SortStateOptions {
1096
+ readonly columnSort?: boolean;
1097
+ readonly caseSensitive?: boolean;
1098
+ readonly sortMethod?: "pinYin" | "stroke";
1099
+ }
1100
+ interface PrintOptions {
1101
+ readonly horizontalCentered?: boolean;
1102
+ readonly verticalCentered?: boolean;
1103
+ readonly headings?: boolean;
1104
+ readonly gridLines?: boolean;
1105
+ readonly gridLinesSet?: boolean;
1106
+ }
1107
+ interface SheetFormatPrOptions {
1108
+ readonly baseColWidth?: number;
1109
+ readonly defaultColWidth?: number;
1110
+ readonly defaultRowHeight?: number;
1111
+ readonly zeroHeight?: boolean;
1112
+ readonly thickTop?: boolean;
1113
+ readonly thickBottom?: boolean;
1114
+ readonly outlineLevelRow?: number;
1115
+ readonly outlineLevelCol?: number;
1116
+ }
1117
+ interface SheetPrOptions {
1118
+ readonly syncHorizontal?: boolean;
1119
+ readonly syncVertical?: boolean;
1120
+ readonly syncRef?: string;
1121
+ readonly transitionEvaluation?: boolean;
1122
+ readonly transitionEntry?: boolean;
1123
+ readonly published?: boolean;
1124
+ readonly filterMode?: boolean;
1125
+ readonly enableFormatConditionsCalculation?: boolean;
1126
+ readonly outlineApplyStyles?: boolean;
1127
+ readonly outlineShowSymbols?: boolean;
1128
+ }
1129
+ interface IgnoredErrorOptions {
1130
+ readonly sqref: string;
1131
+ readonly evalError?: boolean;
1132
+ readonly twoDigitTextYear?: boolean;
1133
+ readonly numberStoredAsText?: boolean;
1134
+ readonly formula?: boolean;
1135
+ readonly formulaRange?: boolean;
1136
+ readonly unlockedFormula?: boolean;
1137
+ readonly emptyCellReference?: boolean;
1138
+ readonly listDataValidation?: boolean;
1139
+ readonly calculatedColumn?: boolean;
1140
+ }
1141
+ interface PhoneticPrOptions {
1142
+ readonly fontId: number;
1143
+ readonly type?: "fullwidthKatakana" | "halfwidthKatakana" | "Hiragana" | "noConversion";
1144
+ readonly alignment?: "left" | "center" | "distributed";
1145
+ }
1146
+ interface SheetBackgroundImageOptions {
1147
+ readonly data: Uint8Array;
1148
+ readonly type: "png" | "jpeg" | "jpg";
1149
+ }
1150
+ interface PageBreakOptions {
1151
+ readonly id: number;
1152
+ readonly min?: number;
1153
+ readonly max?: number;
1154
+ readonly manual?: boolean;
1155
+ readonly pivot?: boolean;
1156
+ }
1157
+ interface SelectionOptions {
1158
+ readonly pane?: "bottomRight" | "topRight" | "bottomLeft" | "topLeft";
1159
+ readonly activeCell?: string;
1160
+ readonly activeCellId?: number;
1161
+ readonly sqref?: string;
1162
+ }
1163
+ interface CustomSheetViewOptions {
1164
+ readonly guid: string;
1165
+ readonly scale?: number;
1166
+ readonly showPageBreaks?: boolean;
1167
+ readonly showFormulas?: boolean;
1168
+ readonly showGridLines?: boolean;
1169
+ readonly showRowColHeaders?: boolean;
1170
+ readonly outlineSymbols?: boolean;
1171
+ readonly zeroValues?: boolean;
1172
+ readonly fitToPage?: boolean;
1173
+ readonly printArea?: boolean;
1174
+ readonly filter?: boolean;
1175
+ readonly showAutoFilter?: boolean;
1176
+ readonly hiddenRows?: boolean;
1177
+ readonly hiddenColumns?: boolean;
1178
+ readonly state?: "visible" | "hidden" | "veryHidden";
1179
+ readonly filterUnique?: boolean;
1180
+ readonly view?: "normal" | "pageBreakPreview" | "pageLayout";
1181
+ }
1182
+ interface CellWatchOptions {
1183
+ readonly r: string;
1184
+ }
1185
+ interface DataConsolidateOptions {
1186
+ readonly function?: "average" | "count" | "countNums" | "max" | "min" | "product" | "stdDev" | "stdDevp" | "sum" | "var" | "varp";
1187
+ readonly topLabels?: boolean;
1188
+ readonly leftLabels?: boolean;
1189
+ readonly startLabels?: boolean;
1190
+ readonly link?: boolean;
1191
+ readonly refs?: readonly string[];
1192
+ }
1193
+ interface DrawingHfOptions {
1194
+ readonly rId: string;
1195
+ readonly lho?: number;
1196
+ readonly lhe?: number;
1197
+ readonly lhf?: number;
1198
+ readonly cho?: number;
1199
+ readonly che?: number;
1200
+ readonly chf?: number;
1201
+ readonly rho?: number;
1202
+ readonly rhe?: number;
1203
+ readonly rhf?: number;
1204
+ readonly lfo?: number;
1205
+ readonly lfe?: number;
1206
+ readonly lff?: number;
1207
+ readonly cfo?: number;
1208
+ readonly cfe?: number;
1209
+ readonly cff?: number;
1210
+ readonly rfo?: number;
1211
+ readonly rfe?: number;
1212
+ readonly rff?: number;
372
1213
  }
373
1214
  interface WorksheetOptions {
374
1215
  readonly name?: string;
@@ -377,6 +1218,8 @@ interface WorksheetOptions {
377
1218
  readonly mergeCells?: readonly MergeCellOptions[];
378
1219
  readonly freezePanes?: FreezePaneOptions;
379
1220
  readonly protection?: SheetProtectionOptions;
1221
+ readonly protectedRanges?: readonly ProtectedRangeOptions[];
1222
+ readonly scenarios?: ScenarioOptions;
380
1223
  readonly autoFilter?: string | AutoFilterOptions;
381
1224
  readonly images?: readonly WorksheetImageOptions[];
382
1225
  readonly charts?: readonly WorksheetChartOptions[];
@@ -389,6 +1232,76 @@ interface WorksheetOptions {
389
1232
  readonly tabColor?: TabColorOptions;
390
1233
  readonly sheetView?: SheetViewOptions;
391
1234
  readonly pivotTables?: readonly PivotTableOptions[];
1235
+ readonly tables?: readonly TableOptions[];
1236
+ readonly ignoredErrors?: readonly IgnoredErrorOptions[];
1237
+ readonly phoneticPr?: PhoneticPrOptions;
1238
+ readonly backgroundImage?: SheetBackgroundImageOptions;
1239
+ readonly printOptions?: PrintOptions;
1240
+ readonly sheetFormatPr?: SheetFormatPrOptions;
1241
+ readonly sheetPr?: SheetPrOptions;
1242
+ readonly rowBreaks?: readonly PageBreakOptions[];
1243
+ readonly colBreaks?: readonly PageBreakOptions[];
1244
+ readonly customSheetViews?: readonly CustomSheetViewOptions[];
1245
+ readonly cellWatches?: readonly CellWatchOptions[];
1246
+ readonly dataConsolidate?: DataConsolidateOptions;
1247
+ readonly oleSize?: string;
1248
+ readonly drawingHF?: DrawingHfOptions;
1249
+ readonly legacyDrawingHF?: string;
1250
+ readonly selection?: SelectionOptions;
1251
+ readonly sheetCalcPr?: SheetCalcPrOptions;
1252
+ readonly ext?: string;
1253
+ readonly controls?: readonly ControlOptions[];
1254
+ readonly customProperties?: readonly CustomPropertyOptions[];
1255
+ readonly oleObjects?: readonly OleObjectOptions[];
1256
+ readonly webPublishItems?: readonly WebPublishItemOptions[];
1257
+ }
1258
+ interface SheetCalcPrOptions {
1259
+ readonly fullCalcOnLoad?: boolean;
1260
+ }
1261
+ interface ControlOptions {
1262
+ readonly shapeId: number;
1263
+ readonly rId: string;
1264
+ readonly name?: string;
1265
+ readonly locked?: boolean;
1266
+ readonly uiObject?: boolean;
1267
+ }
1268
+ interface CustomPropertyOptions {
1269
+ readonly name: string;
1270
+ readonly rId: string;
1271
+ }
1272
+ interface OleObjectOptions {
1273
+ readonly progId?: string;
1274
+ readonly dvAspect?: "DVASPECT_CONTENT" | "DVASPECT_ICON";
1275
+ readonly link?: string;
1276
+ readonly oleUpdate?: "OLEUPDATE_ALWAYS" | "OLEUPDATE_ONCALL";
1277
+ readonly autoLoad?: boolean;
1278
+ readonly shapeId: number;
1279
+ readonly rId?: string;
1280
+ readonly objectPr?: OleObjectPrOptions;
1281
+ }
1282
+ interface OleObjectPrOptions {
1283
+ readonly locked?: boolean;
1284
+ readonly defaultSize?: boolean;
1285
+ readonly print?: boolean;
1286
+ readonly disabled?: boolean;
1287
+ readonly uiObject?: boolean;
1288
+ readonly autoFill?: boolean;
1289
+ readonly autoLine?: boolean;
1290
+ readonly autoPict?: boolean;
1291
+ readonly macro?: string;
1292
+ readonly altText?: string;
1293
+ readonly dde?: boolean;
1294
+ readonly rId?: string;
1295
+ }
1296
+ interface WebPublishItemOptions {
1297
+ readonly id: number;
1298
+ readonly divId: string;
1299
+ readonly sourceType: "sheet" | "printArea" | "autoFilter" | "range" | "chart" | "pivotTable" | "query" | "label";
1300
+ readonly sourceRef?: string;
1301
+ readonly sourceObject?: string;
1302
+ readonly destinationFile: string;
1303
+ readonly title?: string;
1304
+ readonly autoRepublish?: boolean;
392
1305
  }
393
1306
  declare class Worksheet extends IgnoreIfEmptyXmlComponent {
394
1307
  private readonly rows;
@@ -396,6 +1309,8 @@ declare class Worksheet extends IgnoreIfEmptyXmlComponent {
396
1309
  private readonly mergeCells;
397
1310
  private readonly freezePanes?;
398
1311
  private readonly protection?;
1312
+ private readonly protectedRanges;
1313
+ private readonly scenarioOpts?;
399
1314
  private readonly autoFilter?;
400
1315
  private readonly images;
401
1316
  private readonly chartOptions;
@@ -408,6 +1323,28 @@ declare class Worksheet extends IgnoreIfEmptyXmlComponent {
408
1323
  private readonly tabColor?;
409
1324
  private readonly sheetView?;
410
1325
  private readonly pivotTableOptions;
1326
+ private readonly tableOptions;
1327
+ private readonly ignoredErrors;
1328
+ private readonly phoneticPr?;
1329
+ private readonly backgroundImage?;
1330
+ private readonly printOptions?;
1331
+ private readonly sheetFormatPr?;
1332
+ private readonly sheetPr?;
1333
+ private readonly rowBreaks;
1334
+ private readonly colBreaks;
1335
+ private readonly customSheetViews;
1336
+ private readonly cellWatches;
1337
+ private readonly dataConsolidate?;
1338
+ private readonly oleSize?;
1339
+ private readonly drawingHF?;
1340
+ private readonly legacyDrawingHF?;
1341
+ private readonly selection?;
1342
+ private readonly sheetCalcPr?;
1343
+ private readonly ext?;
1344
+ private readonly controls;
1345
+ private readonly customProperties;
1346
+ private readonly oleObjects;
1347
+ private readonly webPublishItems;
411
1348
  constructor(options: WorksheetOptions);
412
1349
  get imageOptions(): readonly WorksheetImageOptions[];
413
1350
  get charts(): readonly WorksheetChartOptions[];
@@ -415,8 +1352,13 @@ declare class Worksheet extends IgnoreIfEmptyXmlComponent {
415
1352
  get worksheetRows(): readonly RowOptions[];
416
1353
  get commentOptions(): readonly CommentOptions[];
417
1354
  get pivotTables(): readonly PivotTableOptions[];
1355
+ get tables(): readonly TableOptions[];
1356
+ get background(): SheetBackgroundImageOptions | undefined;
418
1357
  toXml(context: Context): string;
1358
+ private buildCfvoXml;
419
1359
  private buildSheetViewAttrs;
1360
+ private buildSelectionXml;
1361
+ private buildPivotSelectionXml;
420
1362
  private hashPassword;
421
1363
  private buildFormulaString;
422
1364
  private buildCellString;
@@ -425,15 +1367,133 @@ declare class Worksheet extends IgnoreIfEmptyXmlComponent {
425
1367
  private dateToSerialNumber;
426
1368
  }
427
1369
  //#endregion
1370
+ //#region src/file/shared-strings.d.ts
1371
+ declare class SharedStrings extends BaseXmlComponent {
1372
+ private readonly entries;
1373
+ private readonly indexMap;
1374
+ constructor();
1375
+ register(s: string): number;
1376
+ registerRich(rst: RichTextOptions): number;
1377
+ get count(): number;
1378
+ toXml(_context: Context): string;
1379
+ }
1380
+ //#endregion
1381
+ //#region src/file/chartsheet/chartsheet.d.ts
1382
+ interface ChartsheetPageMargins {
1383
+ readonly left?: number;
1384
+ readonly right?: number;
1385
+ readonly top?: number;
1386
+ readonly bottom?: number;
1387
+ readonly header?: number;
1388
+ readonly footer?: number;
1389
+ }
1390
+ interface ChartsheetPageSetup {
1391
+ readonly paperSize?: number;
1392
+ readonly orientation?: string;
1393
+ readonly horizontalDpi?: number;
1394
+ readonly verticalDpi?: number;
1395
+ readonly copies?: number;
1396
+ }
1397
+ interface ChartsheetProtectionOptions {
1398
+ readonly content?: boolean;
1399
+ readonly objects?: boolean;
1400
+ }
1401
+ interface ChartsheetHeaderFooterOptions {
1402
+ readonly differentFirst?: boolean;
1403
+ readonly differentOddEven?: boolean;
1404
+ readonly oddHeader?: string;
1405
+ readonly oddFooter?: string;
1406
+ }
1407
+ interface ChartsheetOptions {
1408
+ readonly name?: string;
1409
+ readonly tabColor?: string;
1410
+ readonly pageMargins?: ChartsheetPageMargins;
1411
+ readonly pageSetup?: ChartsheetPageSetup;
1412
+ readonly headerFooter?: ChartsheetHeaderFooterOptions;
1413
+ readonly sheetProtection?: ChartsheetProtectionOptions;
1414
+ readonly published?: boolean;
1415
+ readonly zoomToFit?: boolean;
1416
+ readonly chart: {
1417
+ readonly type: string;
1418
+ readonly title?: string;
1419
+ readonly categories?: readonly string[];
1420
+ readonly series: readonly {
1421
+ readonly name: string;
1422
+ readonly values: readonly number[];
1423
+ }[];
1424
+ };
1425
+ }
1426
+ //#endregion
1427
+ //#region src/file/external-link/external-link-xml.d.ts
1428
+ interface ExternalDefinedNameOptions {
1429
+ readonly name: string;
1430
+ readonly refersTo?: string;
1431
+ readonly sheetId?: number;
1432
+ }
1433
+ interface ExternalCellOptions {
1434
+ readonly reference: string;
1435
+ readonly type?: string;
1436
+ readonly value?: string;
1437
+ }
1438
+ interface ExternalBookOptions {
1439
+ readonly target?: string;
1440
+ readonly sheetNames?: readonly string[];
1441
+ readonly definedNames?: readonly ExternalDefinedNameOptions[];
1442
+ readonly sheetDataSet?: readonly ExternalSheetDataOptions[];
1443
+ }
1444
+ interface ExternalRowOptions {
1445
+ readonly rowNumber: number;
1446
+ readonly cells?: readonly ExternalCellOptions[];
1447
+ }
1448
+ interface ExternalSheetDataOptions {
1449
+ readonly sheetId: number;
1450
+ readonly refreshError?: boolean;
1451
+ readonly rows?: readonly ExternalRowOptions[];
1452
+ }
1453
+ interface ExternalLinkOptions {
1454
+ readonly externalBook?: ExternalBookOptions;
1455
+ readonly bookRId?: string;
1456
+ readonly oleLink?: OleLinkOptions;
1457
+ readonly oleRId?: string;
1458
+ }
1459
+ interface OleItemOptions {
1460
+ readonly name: string;
1461
+ readonly advise?: boolean;
1462
+ readonly prefer?: boolean;
1463
+ }
1464
+ interface OleLinkOptions {
1465
+ readonly oleItems?: readonly OleItemOptions[];
1466
+ }
1467
+ //#endregion
428
1468
  //#region src/file/file.d.ts
429
1469
  interface WorkbookOptions extends CorePropertiesOptions {
430
1470
  readonly worksheets?: readonly WorksheetOptions[];
1471
+ readonly chartsheets?: readonly ChartsheetOptions[];
431
1472
  readonly dxfs?: readonly DxfOptions[];
1473
+ readonly workbookProtection?: WorkbookProtectionOptions;
1474
+ readonly externalLinks?: readonly ExternalLinkOptions[];
1475
+ readonly customWorkbookViews?: readonly CustomWorkbookViewOptions[];
1476
+ readonly fileRecoveryPr?: FileRecoveryPrOptions;
1477
+ readonly functionGroups?: readonly string[];
1478
+ readonly webPublishing?: WebPublishingOptions;
1479
+ readonly fileSharing?: FileSharingOptions;
1480
+ readonly volTypes?: readonly VolTypeOptions[];
1481
+ readonly webPublishObjects?: readonly WebPublishObjectOptions[];
432
1482
  }
433
1483
  declare class File {
434
1484
  private readonly worksheetOptions;
1485
+ private readonly chartsheetOptions;
435
1486
  private readonly corePropsOptions;
436
1487
  private readonly dxfOptions;
1488
+ private readonly protectionOptions?;
1489
+ private readonly externalLinkOptions;
1490
+ private readonly customViewOptions?;
1491
+ private readonly fileRecoveryPrOpts?;
1492
+ private readonly functionGroupOpts?;
1493
+ private readonly webPublishingOpts?;
1494
+ private readonly fileSharingOpts?;
1495
+ private readonly volTypeOpts?;
1496
+ private readonly webPublishObjectOpts?;
437
1497
  private _coreProperties?;
438
1498
  private _appProperties?;
439
1499
  private _contentTypes?;
@@ -461,12 +1521,539 @@ declare class File {
461
1521
  get dxfEntries(): readonly DxfOptions[];
462
1522
  get pivotCacheRefs(): readonly PivotCacheReference[];
463
1523
  registerPivotCache(cacheId: number, rId: string): void;
1524
+ get externalLinks(): readonly ExternalLinkOptions[];
464
1525
  get worksheetConfigs(): readonly WorksheetOptions[];
1526
+ get chartsheetConfigs(): readonly ChartsheetOptions[];
465
1527
  get worksheets(): readonly Worksheet[];
466
1528
  get fileRelationships(): Relationships;
467
1529
  get workbookRelationships(): Relationships;
468
1530
  }
469
1531
  //#endregion
1532
+ //#region src/file/dialogsheet/dialogsheet.d.ts
1533
+ interface DialogsheetPageMargins {
1534
+ readonly left?: number;
1535
+ readonly right?: number;
1536
+ readonly top?: number;
1537
+ readonly bottom?: number;
1538
+ readonly header?: number;
1539
+ readonly footer?: number;
1540
+ }
1541
+ interface DialogsheetPageSetup {
1542
+ readonly paperSize?: number;
1543
+ readonly orientation?: string;
1544
+ readonly horizontalDpi?: number;
1545
+ readonly verticalDpi?: number;
1546
+ readonly copies?: number;
1547
+ }
1548
+ interface DialogsheetProtectionOptions {
1549
+ readonly content?: boolean;
1550
+ readonly objects?: boolean;
1551
+ readonly scenarios?: boolean;
1552
+ }
1553
+ interface DialogsheetOptions {
1554
+ readonly name?: string;
1555
+ readonly tabColor?: string;
1556
+ readonly pageMargins?: DialogsheetPageMargins;
1557
+ readonly pageSetup?: DialogsheetPageSetup;
1558
+ readonly sheetProtection?: DialogsheetProtectionOptions;
1559
+ }
1560
+ declare class Dialogsheet extends BaseXmlComponent {
1561
+ private readonly opts;
1562
+ constructor(options: DialogsheetOptions);
1563
+ toXml(_context: Context): string;
1564
+ }
1565
+ //#endregion
1566
+ //#region src/file/query-table/query-table-xml.d.ts
1567
+ interface QueryTableDeletedFieldOptions {
1568
+ readonly name: string;
1569
+ }
1570
+ interface QueryTableFieldOptions {
1571
+ readonly id: number;
1572
+ readonly name?: string;
1573
+ readonly tableColumnId?: number;
1574
+ readonly row?: number;
1575
+ readonly fillFormatting?: boolean;
1576
+ readonly textFormatting?: boolean;
1577
+ readonly numberFormatting?: boolean;
1578
+ readonly borderFormatting?: boolean;
1579
+ readonly width?: number;
1580
+ readonly clipped?: boolean;
1581
+ }
1582
+ interface QueryTableRefreshOptions {
1583
+ readonly nextId?: number;
1584
+ readonly minimumVersion?: number;
1585
+ readonly preserveFormatting?: boolean;
1586
+ readonly adjustColumnWidth?: boolean;
1587
+ readonly refreshOnLoad?: boolean;
1588
+ readonly backgroundRefresh?: boolean;
1589
+ readonly deletedFields?: readonly QueryTableDeletedFieldOptions[];
1590
+ readonly queryTableFields?: readonly QueryTableFieldOptions[];
1591
+ readonly rowCount?: number;
1592
+ }
1593
+ interface QueryTableOptions {
1594
+ readonly name?: string;
1595
+ readonly connectionId: number;
1596
+ readonly autoFormat?: boolean;
1597
+ readonly preserveFormatting?: boolean;
1598
+ readonly adjustColumnWidth?: boolean;
1599
+ readonly refreshOnLoad?: boolean;
1600
+ readonly backgroundRefresh?: boolean;
1601
+ readonly rowNumbers?: boolean;
1602
+ readonly disableRefresh?: boolean;
1603
+ readonly firstBackgroundRefresh?: boolean;
1604
+ readonly growShrinkType?: boolean;
1605
+ readonly fillFormulas?: boolean;
1606
+ readonly removeDataOnSave?: boolean;
1607
+ readonly disableEdit?: boolean;
1608
+ readonly intermediate?: boolean;
1609
+ readonly queryTableRefresh?: QueryTableRefreshOptions;
1610
+ }
1611
+ declare class QueryTableXml extends BaseXmlComponent {
1612
+ private readonly opts;
1613
+ constructor(options: QueryTableOptions);
1614
+ toXml(_context: Context): string;
1615
+ }
1616
+ //#endregion
1617
+ //#region src/file/metadata/metadata-xml.d.ts
1618
+ interface MetadataTypeOptions {
1619
+ readonly name: string;
1620
+ readonly minVersion?: number;
1621
+ readonly minSupportedVersion?: number;
1622
+ readonly ghostRow?: boolean;
1623
+ readonly ghostCol?: boolean;
1624
+ readonly edit?: boolean;
1625
+ readonly delete?: boolean;
1626
+ readonly copy?: boolean;
1627
+ readonly paste?: boolean;
1628
+ readonly pasteAll?: boolean;
1629
+ readonly pasteFormulas?: boolean;
1630
+ readonly pasteValues?: boolean;
1631
+ readonly pasteFormats?: boolean;
1632
+ readonly pasteComments?: boolean;
1633
+ readonly pasteDataValidation?: boolean;
1634
+ readonly pasteBorders?: boolean;
1635
+ readonly pasteColWidths?: boolean;
1636
+ readonly pasteNumberFormats?: boolean;
1637
+ readonly merge?: boolean;
1638
+ readonly splitFirst?: boolean;
1639
+ readonly splitAll?: boolean;
1640
+ readonly rowColShift?: boolean;
1641
+ readonly clearAll?: boolean;
1642
+ readonly clearFormats?: boolean;
1643
+ readonly clearContents?: boolean;
1644
+ readonly clearComments?: boolean;
1645
+ readonly assign?: boolean;
1646
+ readonly coerce?: boolean;
1647
+ readonly adjust?: boolean;
1648
+ readonly cellMeta?: boolean;
1649
+ }
1650
+ interface MetadataStringOptions {
1651
+ readonly value: string;
1652
+ }
1653
+ interface FutureMetadataOptions {
1654
+ readonly name: string;
1655
+ readonly type: string;
1656
+ }
1657
+ interface MetadataRecordOptions {
1658
+ readonly t: number;
1659
+ readonly v: number;
1660
+ }
1661
+ interface MetadataBlockOptions {
1662
+ readonly records?: readonly MetadataRecordOptions[];
1663
+ }
1664
+ interface MetadataOptions {
1665
+ readonly types?: readonly MetadataTypeOptions[];
1666
+ readonly strings?: readonly MetadataStringOptions[];
1667
+ readonly futureMetadata?: readonly FutureMetadataOptions[];
1668
+ readonly mdxMetadata?: readonly MdxOptions[];
1669
+ readonly cellMetadataBlocks?: readonly MetadataBlockOptions[];
1670
+ readonly valueMetadataBlocks?: readonly MetadataBlockOptions[];
1671
+ }
1672
+ interface MdxOptions {
1673
+ readonly f: string;
1674
+ readonly n: number;
1675
+ readonly tuple?: MdxTupleOptions;
1676
+ readonly set?: MdxSetOptions;
1677
+ readonly memberProp?: MdxMemberPropOptions;
1678
+ readonly kpi?: MdxKpiOptions;
1679
+ }
1680
+ interface MdxTupleOptions {
1681
+ readonly c?: number;
1682
+ }
1683
+ interface MdxSetOptions {
1684
+ readonly ns: number;
1685
+ }
1686
+ interface MdxMemberPropOptions {
1687
+ readonly n: number;
1688
+ readonly np: number;
1689
+ }
1690
+ interface MdxKpiOptions {
1691
+ readonly n: number;
1692
+ readonly np: number;
1693
+ readonly p: string;
1694
+ }
1695
+ declare class MetadataXml extends BaseXmlComponent {
1696
+ private readonly opts;
1697
+ constructor(options: MetadataOptions);
1698
+ toXml(_context: Context): string;
1699
+ }
1700
+ //#endregion
1701
+ //#region src/file/revision-log/revision-types.d.ts
1702
+ interface SheetIdEntry {
1703
+ readonly id: number;
1704
+ }
1705
+ interface RevisionHeaderEntry {
1706
+ readonly guid: string;
1707
+ readonly dateTime: string;
1708
+ readonly userName: string;
1709
+ readonly rId: string;
1710
+ readonly maxSheetId: number;
1711
+ readonly sheetIds?: readonly SheetIdEntry[];
1712
+ readonly minRId?: number;
1713
+ readonly maxRId?: number;
1714
+ }
1715
+ interface RevisionHeadersOptions {
1716
+ readonly guid: string;
1717
+ readonly lastGuid?: string;
1718
+ readonly headers: readonly RevisionHeaderEntry[];
1719
+ readonly shared?: boolean;
1720
+ readonly history?: boolean;
1721
+ readonly trackRevisions?: boolean;
1722
+ readonly revisionId?: number;
1723
+ readonly version?: number;
1724
+ readonly keepChangeHistory?: boolean;
1725
+ readonly protected?: boolean;
1726
+ readonly preserveHistory?: number;
1727
+ }
1728
+ type RowColumnAction = "insertRow" | "insertCol" | "deleteRow" | "deleteCol";
1729
+ interface RevisionRowColumnOptions {
1730
+ readonly action: RowColumnAction;
1731
+ readonly rId: number;
1732
+ readonly row?: number;
1733
+ readonly col?: number;
1734
+ readonly sheetIndex?: number;
1735
+ readonly edge?: boolean;
1736
+ }
1737
+ interface RevisionCellChangeOptions {
1738
+ readonly rId: number;
1739
+ readonly ref: string;
1740
+ readonly sheetIndex?: number;
1741
+ readonly oldValue?: string | number;
1742
+ readonly oldType?: string;
1743
+ readonly newValue?: string | number;
1744
+ readonly newType?: string;
1745
+ readonly formula?: string;
1746
+ readonly numFmtId?: number;
1747
+ readonly xfDxf?: number;
1748
+ readonly quotePrefix?: boolean;
1749
+ readonly oldQuotePrefix?: boolean;
1750
+ readonly ph?: boolean;
1751
+ readonly oldPh?: boolean;
1752
+ readonly endOfListFormulaUpdate?: boolean;
1753
+ }
1754
+ interface RevisionMoveOptions {
1755
+ readonly rId: number;
1756
+ readonly source: string;
1757
+ readonly destination: string;
1758
+ readonly sheetIndex?: number;
1759
+ readonly sourceSheetId?: number;
1760
+ }
1761
+ interface RevisionFormattingOptions {
1762
+ readonly rId: number;
1763
+ readonly ref: string;
1764
+ readonly sheetIndex?: number;
1765
+ readonly s?: number;
1766
+ readonly xfDxf?: number;
1767
+ }
1768
+ interface RevisionInsertSheetOptions {
1769
+ readonly rId: number;
1770
+ readonly name: string;
1771
+ readonly sheetIndex?: number;
1772
+ readonly sheetPosition?: number;
1773
+ }
1774
+ interface RevisionCommentOptions {
1775
+ readonly rId: number;
1776
+ readonly ref: string;
1777
+ readonly sheetIndex?: number;
1778
+ readonly text?: string;
1779
+ readonly author?: string;
1780
+ readonly alwaysShow?: boolean;
1781
+ readonly old?: boolean;
1782
+ readonly hiddenRow?: boolean;
1783
+ readonly hiddenColumn?: boolean;
1784
+ readonly oldLength?: number;
1785
+ readonly newLength?: number;
1786
+ }
1787
+ interface RevisionDefinedNameOptions {
1788
+ readonly rId: number;
1789
+ readonly name: string;
1790
+ readonly value?: string;
1791
+ readonly localSheetId?: number;
1792
+ readonly customView?: boolean;
1793
+ readonly function?: boolean;
1794
+ readonly oldFunction?: boolean;
1795
+ readonly functionGroupId?: number;
1796
+ readonly oldFunctionGroupId?: number;
1797
+ readonly shortcutKey?: string;
1798
+ readonly oldShortcutKey?: string;
1799
+ readonly oldHidden?: boolean;
1800
+ readonly customMenu?: string;
1801
+ readonly oldCustomMenu?: string;
1802
+ readonly oldDescription?: string;
1803
+ readonly help?: string;
1804
+ readonly oldHelp?: string;
1805
+ readonly statusBar?: string;
1806
+ readonly oldStatusBar?: string;
1807
+ readonly oldComment?: string;
1808
+ }
1809
+ interface RevisionReviewedOptions {
1810
+ readonly rId: number;
1811
+ }
1812
+ interface RevisionUndoOptions {
1813
+ readonly rId: number;
1814
+ }
1815
+ interface RevisionAutoFormattingOptions {
1816
+ readonly rId: number;
1817
+ readonly sheetIndex?: number;
1818
+ readonly ref?: string;
1819
+ }
1820
+ interface RevisionCustomViewOptions {
1821
+ readonly rId: number;
1822
+ readonly guid?: string;
1823
+ }
1824
+ interface RevisionSheetRenameOptions {
1825
+ readonly rId: number;
1826
+ readonly sheetIndex?: number;
1827
+ readonly oldName?: string;
1828
+ readonly newName?: string;
1829
+ }
1830
+ interface RevisionQueryTableFieldOptions {
1831
+ readonly rId: number;
1832
+ readonly sheetIndex?: number;
1833
+ readonly fieldId?: number;
1834
+ }
1835
+ interface RevisionConflictOptions {
1836
+ readonly rId: number;
1837
+ readonly sheetIndex?: number;
1838
+ }
1839
+ type RevisionEntry = {
1840
+ readonly type: "rowColumn";
1841
+ readonly data: RevisionRowColumnOptions;
1842
+ } | {
1843
+ readonly type: "cellChange";
1844
+ readonly data: RevisionCellChangeOptions;
1845
+ } | {
1846
+ readonly type: "move";
1847
+ readonly data: RevisionMoveOptions;
1848
+ } | {
1849
+ readonly type: "formatting";
1850
+ readonly data: RevisionFormattingOptions;
1851
+ } | {
1852
+ readonly type: "insertSheet";
1853
+ readonly data: RevisionInsertSheetOptions;
1854
+ } | {
1855
+ readonly type: "comment";
1856
+ readonly data: RevisionCommentOptions;
1857
+ } | {
1858
+ readonly type: "definedName";
1859
+ readonly data: RevisionDefinedNameOptions;
1860
+ } | {
1861
+ readonly type: "reviewed";
1862
+ readonly data: RevisionReviewedOptions;
1863
+ } | {
1864
+ readonly type: "undo";
1865
+ readonly data: RevisionUndoOptions;
1866
+ } | {
1867
+ readonly type: "autoFormatting";
1868
+ readonly data: RevisionAutoFormattingOptions;
1869
+ } | {
1870
+ readonly type: "customView";
1871
+ readonly data: RevisionCustomViewOptions;
1872
+ } | {
1873
+ readonly type: "sheetRename";
1874
+ readonly data: RevisionSheetRenameOptions;
1875
+ } | {
1876
+ readonly type: "queryTableField";
1877
+ readonly data: RevisionQueryTableFieldOptions;
1878
+ } | {
1879
+ readonly type: "conflict";
1880
+ readonly data: RevisionConflictOptions;
1881
+ };
1882
+ interface RevisionLogOptions {
1883
+ readonly revisions?: readonly RevisionEntry[];
1884
+ }
1885
+ interface SharedUserOptions {
1886
+ readonly guid: string;
1887
+ readonly name: string;
1888
+ readonly id: number;
1889
+ readonly dateTime?: string;
1890
+ }
1891
+ interface UsersOptions {
1892
+ readonly users?: readonly SharedUserOptions[];
1893
+ }
1894
+ //#endregion
1895
+ //#region src/file/revision-log/revision-headers-xml.d.ts
1896
+ declare class RevisionHeadersXml extends BaseXmlComponent {
1897
+ private readonly opts;
1898
+ private readonly users?;
1899
+ constructor(options: RevisionHeadersOptions, users?: UsersOptions);
1900
+ toXml(_context: Context): string;
1901
+ buildUsersXml(): string;
1902
+ }
1903
+ //#endregion
1904
+ //#region src/file/revision-log/revision-xml.d.ts
1905
+ declare class RevisionLogXml extends BaseXmlComponent {
1906
+ private readonly entries;
1907
+ constructor(entries: readonly RevisionEntry[]);
1908
+ toXml(_context: Context): string;
1909
+ }
1910
+ //#endregion
1911
+ //#region src/file/connection/connection-xml.d.ts
1912
+ interface DbPrOptions {
1913
+ readonly connection: string;
1914
+ readonly command?: string;
1915
+ readonly commandType?: number;
1916
+ readonly serverCommand?: string;
1917
+ }
1918
+ interface WebPrOptions {
1919
+ readonly url: string;
1920
+ readonly sourceData?: boolean;
1921
+ readonly htmlFormat?: string;
1922
+ readonly htmlTables?: readonly string[];
1923
+ readonly consecutive?: boolean;
1924
+ readonly firstRowHeader?: boolean;
1925
+ readonly parsePre?: boolean;
1926
+ readonly xl2000?: boolean;
1927
+ readonly textFields?: readonly TextFieldOptions[];
1928
+ }
1929
+ interface TextPrOptions {
1930
+ readonly textFields?: readonly TextFieldOptions[];
1931
+ readonly codePage?: number;
1932
+ readonly characterSet?: string;
1933
+ readonly sourceFile?: string;
1934
+ readonly delimited?: boolean;
1935
+ readonly tab?: boolean;
1936
+ readonly space?: boolean;
1937
+ readonly comma?: boolean;
1938
+ readonly semicolon?: boolean;
1939
+ readonly custom?: string;
1940
+ readonly decimal?: string;
1941
+ readonly thousands?: string;
1942
+ readonly trailingMinus?: boolean;
1943
+ }
1944
+ interface TextFieldOptions {
1945
+ readonly type: number;
1946
+ readonly dataType?: string;
1947
+ }
1948
+ interface ParameterOptions {
1949
+ readonly name: string;
1950
+ readonly sqlType?: number;
1951
+ readonly characterSet?: string;
1952
+ readonly stringValue?: string;
1953
+ readonly integerValue?: number;
1954
+ readonly booleanValue?: boolean;
1955
+ readonly refreshOnChange?: boolean;
1956
+ readonly prompt?: boolean;
1957
+ readonly reference?: string;
1958
+ readonly parameterType?: string;
1959
+ }
1960
+ interface ConnectionOptions {
1961
+ readonly id: number;
1962
+ readonly name?: string;
1963
+ readonly type?: number;
1964
+ readonly refreshOnLoad?: boolean;
1965
+ readonly refreshedVersion?: number;
1966
+ readonly backgroundRefresh?: boolean;
1967
+ readonly saveData?: boolean;
1968
+ readonly savePassword?: boolean;
1969
+ readonly description?: string;
1970
+ readonly credentials?: string;
1971
+ readonly dbPr?: DbPrOptions;
1972
+ readonly webPr?: WebPrOptions;
1973
+ readonly textPr?: TextPrOptions;
1974
+ readonly parameters?: readonly ParameterOptions[];
1975
+ }
1976
+ declare class ConnectionsXml extends BaseXmlComponent {
1977
+ private readonly connections;
1978
+ constructor(connections: readonly ConnectionOptions[]);
1979
+ toXml(_context: Context): string;
1980
+ }
1981
+ //#endregion
1982
+ //#region src/file/xml-mapping/xml-mapping-xml.d.ts
1983
+ interface SchemaOptions {
1984
+ readonly id: string;
1985
+ readonly schemaRef?: string;
1986
+ readonly namespace?: string;
1987
+ readonly schemaLanguage?: string;
1988
+ readonly schemaID?: string;
1989
+ readonly elementFormDefault?: string;
1990
+ readonly attributeFormDefault?: string;
1991
+ }
1992
+ interface DataBindingOptions {
1993
+ readonly dataBindingName?: string;
1994
+ readonly fileBinding?: boolean;
1995
+ readonly fileBindingName?: string;
1996
+ readonly connectionID?: number;
1997
+ readonly dataBindingLoadMode?: number;
1998
+ }
1999
+ interface MapOptions {
2000
+ readonly id: number;
2001
+ readonly name: string;
2002
+ readonly rootElement: string;
2003
+ readonly schemaID: string;
2004
+ readonly showImportExportValidationErrors?: boolean;
2005
+ readonly append?: boolean;
2006
+ readonly dataBindingLoadMode?: number;
2007
+ readonly autoFit?: boolean;
2008
+ readonly fileBinding?: boolean;
2009
+ readonly fileBindingName?: string;
2010
+ readonly preserveFormat?: boolean;
2011
+ readonly preserveSortAFLayout?: boolean;
2012
+ readonly dataBinding?: DataBindingOptions;
2013
+ }
2014
+ interface MapInfoOptions {
2015
+ readonly selectionNamespaces: string;
2016
+ readonly schemas: readonly SchemaOptions[];
2017
+ readonly maps: readonly MapOptions[];
2018
+ }
2019
+ interface XmlPrOptions {
2020
+ readonly xmlElement?: string;
2021
+ readonly mapId: number;
2022
+ readonly xpath: string;
2023
+ readonly xmlDataType: string;
2024
+ }
2025
+ interface XmlCellPrOptions {
2026
+ readonly id: number;
2027
+ readonly uniqueName?: string;
2028
+ readonly xmlPr: XmlPrOptions;
2029
+ }
2030
+ interface SingleXmlCellOptions {
2031
+ readonly id: number;
2032
+ readonly r: string;
2033
+ readonly connectionId: number;
2034
+ readonly xmlCellPr: XmlCellPrOptions;
2035
+ }
2036
+ interface XmlColumnPrOptions {
2037
+ readonly xpath: string;
2038
+ readonly xmlDataType: string;
2039
+ readonly mapId: number;
2040
+ }
2041
+ declare class MapInfoXml extends BaseXmlComponent {
2042
+ private readonly options;
2043
+ constructor(options: MapInfoOptions);
2044
+ toXml(_context: Context): string;
2045
+ }
2046
+ declare class SingleXmlCellsXml extends BaseXmlComponent {
2047
+ private readonly cells;
2048
+ constructor(cells: readonly SingleXmlCellOptions[]);
2049
+ toXml(_context: Context): string;
2050
+ }
2051
+ declare class XmlColumnPrXml extends BaseXmlComponent {
2052
+ private readonly options;
2053
+ constructor(options: XmlColumnPrOptions);
2054
+ toXml(_context: Context): string;
2055
+ }
2056
+ //#endregion
470
2057
  //#region src/export/packer/packer.d.ts
471
2058
  declare const Packer: import("@office-open/core").Packer<File>;
472
2059
  //#endregion
@@ -521,5 +2108,5 @@ declare const patchWorkbook: <T extends PatchDocumentOutputType = PatchDocumentO
521
2108
  placeholderDelimiters
522
2109
  }: PatchWorkbookOptions<T>) => Promise<OutputByType$1[T]>;
523
2110
  //#endregion
524
- export { type AlignmentOptions, type BorderOptions, type BorderSideOptions, type CellOptions, type CellPatch, type ColumnOptions, type CompressionOptions, type ConditionalFormatOptions, type ConsolidateFunction, type CorePropertiesOptions, type DataValidationOptions, File, File as Workbook, type FillOptions, type FontOptions, type FormulaOptions, type FreezePaneOptions, type IPatch, type InputDataType, type MergeCellOptions, type OutputByType, type OutputType, Packer, type PackerOptions, type PatchDocumentOutputType, PatchType, type PatchWorkbookOptions, type PivotDataField, type PivotTableOptions, type RowOptions, SharedStrings, type StyleOptions, Styles, type WorkbookOptions, type WorksheetChartOptions, type WorksheetOptions, type XlsxDocument, type XlsxPartRefs, columnToLetter, dateToSerialNumber, letterToColumn, parseWorkbook, parseXlsx, patchWorkbook };
2111
+ export { type AlignmentOptions, type BorderOptions, type BorderSideOptions, type CellOptions, type CellPatch, type CfvoOptions, type CfvoType, type ChartsheetOptions, type ColorScaleOptions, type ColumnOptions, type CompressionOptions, type ConditionalFormatOptions, type ConditionalFormatRule, type ConnectionOptions, ConnectionsXml, type ConsolidateFunction, type CorePropertiesOptions, type CustomWorkbookViewOptions, type DataBarOptions, type DataBindingOptions, type DataValidationOptions, type DbPrOptions, Dialogsheet, type DialogsheetOptions, type ExternalBookOptions, type ExternalDefinedNameOptions, type ExternalLinkOptions, type ExternalSheetDataOptions, File, File as Workbook, type FileRecoveryPrOptions, type FileSharingOptions, type FillOptions, type FontOptions, type FormulaOptions, type FreezePaneOptions, type FutureMetadataOptions, type IPatch, type IconSetOptions, type IconSetType, type IgnoredErrorOptions, type InputDataType, type MapInfoOptions, MapInfoXml, type MapOptions, type MergeCellOptions, type MetadataOptions, type MetadataStringOptions, type MetadataTypeOptions, MetadataXml, type OutputByType, type OutputType, Packer, type PackerOptions, type ParameterOptions, type PatchDocumentOutputType, PatchType, type PatchWorkbookOptions, type PhoneticPrOptions, type PivotDataField, type PivotFilterOptions, PivotFilterType as PivotFilterTypeValue, type PivotTableOptions, type ProtectedRangeOptions, type QueryTableOptions, QueryTableXml, type RevisionCellChangeOptions, type RevisionCommentOptions, type RevisionDefinedNameOptions, type RevisionEntry, type RevisionFormattingOptions, type RevisionHeaderEntry, type RevisionHeadersOptions, RevisionHeadersXml, type RevisionInsertSheetOptions, type RevisionLogOptions, RevisionLogXml, type RevisionMoveOptions, type RevisionRowColumnOptions, type RowOptions, type ScenarioCellOptions, type ScenarioDefinition, type ScenarioOptions, type SchemaOptions, SharedStrings, type SheetBackgroundImageOptions, type SheetProtectionOptions, type SingleXmlCellOptions, SingleXmlCellsXml, type StyleOptions, Styles, type TableColumnOptions, type TableOptions, type TableStyleInfoOptions, TableType, TotalsRowFunction, type WebPrOptions, type WebPublishingOptions, type WorkbookOptions, type WorkbookProtectionOptions, type WorksheetChartOptions, type WorksheetOptions, type XlsxDocument, type XlsxPartRefs, type XmlCellPrOptions, type XmlColumnPrOptions, XmlColumnPrXml, type XmlPrOptions, columnToLetter, dateToSerialNumber, letterToColumn, parseWorkbook, parseXlsx, patchWorkbook };
525
2112
  //# sourceMappingURL=index.d.mts.map