xls-codec 4.12.6 → 4.14.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/README.md +3 -1
- package/dist/biff/font.cjs +127 -0
- package/dist/biff/font.d.cts +2 -0
- package/dist/biff/font.d.ts +2 -0
- package/dist/biff/font.js +119 -0
- package/dist/biff/ptg-writer.cjs +1 -1
- package/dist/biff/ptg-writer.js +1 -1
- package/dist/biff/string-writer.cjs +1 -1
- package/dist/biff/string-writer.js +1 -1
- package/dist/biff/xf-writer.cjs +1 -22
- package/dist/biff/xf-writer.d.cts +1 -2
- package/dist/biff/xf-writer.d.ts +1 -2
- package/dist/biff/xf-writer.js +2 -22
- package/dist/{conditional-format-12-C3nwy1f8.d.ts → conditional-format-12-BTN59oHJ.d.ts} +2 -2
- package/dist/{conditional-format-12-D65-ruTq.d.cts → conditional-format-12-ZkrPfAP4.d.cts} +2 -2
- package/dist/{conditional-format-Cth_afMy.d.cts → conditional-format-BzTJe8Fm.d.cts} +1 -1
- package/dist/{conditional-format-BRMUTRP1.d.ts → conditional-format-D4U0eLcY.d.ts} +1 -1
- package/dist/content.cjs +52 -6
- package/dist/content.js +52 -6
- package/dist/{data-validation-BgUt8CbE.d.cts → data-validation-CTeIudWM.d.cts} +1 -1
- package/dist/{data-validation-Cq6iD8lB.d.ts → data-validation-Cjdk9imN.d.ts} +1 -1
- package/dist/defined-names-CqBJJmOJ.d.cts +39 -0
- package/dist/defined-names-DJZ27hRp.d.ts +39 -0
- package/dist/font-CBvAGxD8.d.cts +45 -0
- package/dist/font-DcXHYgZ2.d.ts +45 -0
- package/dist/index.cjs +5 -6
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/workbook/chart.d.cts +1 -1
- package/dist/workbook/chart.d.ts +1 -1
- package/dist/workbook/comment-writer.cjs +1 -1
- package/dist/workbook/comment-writer.js +1 -1
- package/dist/workbook/conditional-format-12.d.cts +1 -1
- package/dist/workbook/conditional-format-12.d.ts +1 -1
- package/dist/workbook/conditional-format-ex.d.cts +3 -3
- package/dist/workbook/conditional-format-ex.d.ts +3 -3
- package/dist/workbook/conditional-format-write.cjs +1 -1
- package/dist/workbook/conditional-format-write.js +1 -1
- package/dist/workbook/conditional-format.cjs +1 -1
- package/dist/workbook/conditional-format.d.cts +1 -1
- package/dist/workbook/conditional-format.d.ts +1 -1
- package/dist/workbook/conditional-format.js +1 -1
- package/dist/workbook/data-validation-write.cjs +1 -1
- package/dist/workbook/data-validation-write.js +1 -1
- package/dist/workbook/data-validation.d.cts +1 -1
- package/dist/workbook/data-validation.d.ts +1 -1
- package/dist/workbook/defined-names.cjs +186 -0
- package/dist/workbook/defined-names.d.cts +2 -0
- package/dist/workbook/defined-names.d.ts +2 -0
- package/dist/workbook/defined-names.js +182 -0
- package/dist/workbook/drawing.d.cts +1 -1
- package/dist/workbook/drawing.d.ts +1 -1
- package/dist/workbook/globals-writer.cjs +7 -7
- package/dist/workbook/globals-writer.d.cts +9 -2
- package/dist/workbook/globals-writer.d.ts +9 -2
- package/dist/workbook/globals-writer.js +8 -8
- package/dist/workbook/globals.cjs +8 -2
- package/dist/workbook/globals.d.cts +6 -1
- package/dist/workbook/globals.d.ts +6 -1
- package/dist/workbook/globals.js +8 -2
- package/dist/workbook/print-names.cjs +1 -1
- package/dist/workbook/print-names.js +1 -1
- package/dist/workbook/sheet-writer.cjs +4 -4
- package/dist/workbook/sheet-writer.js +4 -4
- package/dist/workbook/sheet.cjs +1 -1
- package/dist/workbook/sheet.d.cts +4 -4
- package/dist/workbook/sheet.d.ts +4 -4
- package/dist/workbook/sheet.js +1 -1
- package/dist/write.cjs +56 -12
- package/dist/write.js +57 -13
- package/dist/written-cells.cjs +4 -2
- package/dist/written-cells.d.cts +2 -2
- package/dist/written-cells.d.ts +2 -2
- package/dist/written-cells.js +4 -2
- package/package.json +4 -4
package/dist/content.js
CHANGED
|
@@ -3,11 +3,13 @@ import { BiffFormatError, readRecords } from "./biff/records.js";
|
|
|
3
3
|
import { readWorkbookStreams } from "./container.js";
|
|
4
4
|
import { inchesToPoints } from "./units.js";
|
|
5
5
|
import { pageSizeFromSetup } from "./biff/print-setup.js";
|
|
6
|
-
import { groupRecords, splitSubstreams } from "./biff/substreams.js";
|
|
7
6
|
import { applyTint, resolveBorderEdge, resolveFillBackground, resolveIcvColor } from "./biff/xf-colors.js";
|
|
7
|
+
import { contentFontOf, resolveFontColor } from "./biff/font.js";
|
|
8
|
+
import { groupRecords, splitSubstreams } from "./biff/substreams.js";
|
|
8
9
|
import { readBlipStore } from "./drawing/blips.js";
|
|
9
10
|
import { concatBytes } from "./drawing/bytes.js";
|
|
10
11
|
import { readSheetComments } from "./workbook/comments.js";
|
|
12
|
+
import { readDefinedNames } from "./workbook/defined-names.js";
|
|
11
13
|
import { readSheetDrawing } from "./workbook/drawing.js";
|
|
12
14
|
import { serialToIsoDate, serialToIsoDateTime, serialToIsoTime } from "./serial.js";
|
|
13
15
|
import { formatCodeOf, readWorkbookGlobals } from "./workbook/globals.js";
|
|
@@ -95,15 +97,46 @@ function readXlsContent(bytes, password) {
|
|
|
95
97
|
const globals = readWorkbookGlobals(globalsSubstream.records);
|
|
96
98
|
const blipStore = readBlipStore(concatDrawingGroupBytes(globalsSubstream.records));
|
|
97
99
|
const documentMetadata = metadata === void 0 ? {} : summaryInformationToLayoutMetadata(readSummaryInformation(metadata));
|
|
100
|
+
const worksheetEntries = globals.sheets.map((entry, sheetIndex) => ({
|
|
101
|
+
entry,
|
|
102
|
+
sheetIndex
|
|
103
|
+
})).filter(({ entry }) => entry.sheetType === SHEET_TYPE_WORKSHEET);
|
|
98
104
|
return {
|
|
99
105
|
kind: "spreadsheet",
|
|
100
106
|
metadata: documentMetadata,
|
|
101
|
-
sheets:
|
|
102
|
-
|
|
103
|
-
sheetIndex
|
|
104
|
-
})).filter(({ entry }) => entry.sheetType === SHEET_TYPE_WORKSHEET).map(({ entry, sheetIndex }) => readSheet(entry, sheetIndex, substreams, globals, blipStore, documentMetadata))
|
|
107
|
+
sheets: worksheetEntries.map(({ entry, sheetIndex }) => readSheet(entry, sheetIndex, substreams, globals, blipStore, documentMetadata)),
|
|
108
|
+
...mapDefinedNames(globalsSubstream.records, globals, worksheetEntries)
|
|
105
109
|
};
|
|
106
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* The document's own `names` array, from the workbook's Lbl records -- absent when the workbook declares no name this reader resolves, matching the schema's optional field.
|
|
113
|
+
*
|
|
114
|
+
* A name's Lbl-scoped sheetIndex is a position in the FULL BoundSheet8 collection, while ContentDefinedNameSchema's scopeSheetIndex names a position in the document's own (worksheet-only) sheets array, so each one is translated through the same filter the sheets themselves went through. A name scoped to a sheet that did not survive the filter -- a chart or macro sheet -- has no scope the schema can express, and is dropped whole rather than re-scoped to a neighbouring index or silently promoted to workbook-global: a wrong scope changes which sheet the name belongs to, not just how it is displayed.
|
|
115
|
+
*/
|
|
116
|
+
function mapDefinedNames(globalsRecords, globals, worksheetEntries) {
|
|
117
|
+
const documentIndexOfSheet = new Map(worksheetEntries.map(({ sheetIndex }, documentIndex) => [sheetIndex, documentIndex]));
|
|
118
|
+
const names = [];
|
|
119
|
+
for (const raw of readDefinedNames(globalsRecords, {
|
|
120
|
+
sheets: globals.sheets,
|
|
121
|
+
sheetRanges: globals.sheetRanges
|
|
122
|
+
})) {
|
|
123
|
+
if (raw.sheetIndex === void 0) {
|
|
124
|
+
names.push({
|
|
125
|
+
name: raw.name,
|
|
126
|
+
refersTo: raw.refersTo
|
|
127
|
+
});
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const scopeSheetIndex = documentIndexOfSheet.get(raw.sheetIndex);
|
|
131
|
+
if (scopeSheetIndex === void 0) continue;
|
|
132
|
+
names.push({
|
|
133
|
+
name: raw.name,
|
|
134
|
+
refersTo: raw.refersTo,
|
|
135
|
+
scopeSheetIndex
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return names.length > 0 ? { names } : {};
|
|
139
|
+
}
|
|
107
140
|
/** Every MsoDrawingGroup record's own data, in stream order, concatenated into one Escher byte stream -- the workbook-wide counterpart of a worksheet's own MsoDrawing concatenation (drawing/shapes.ts's own readSheetShapes), carrying the Blip Store rather than any one sheet's shape tree. */
|
|
108
141
|
function concatDrawingGroupBytes(records) {
|
|
109
142
|
const chunks = records.filter((record) => record.type === 235).map((record) => record.blocks[0]).filter((block) => block !== void 0);
|
|
@@ -382,7 +415,8 @@ function mapCell(cell, globals) {
|
|
|
382
415
|
const background = backgroundOf(globals, cell.xfIndex);
|
|
383
416
|
const borders = bordersOf(globals, cell.xfIndex);
|
|
384
417
|
const { alignment, verticalAlignment } = alignmentOf(globals, cell.xfIndex);
|
|
385
|
-
|
|
418
|
+
const font = fontOf(globals, cell.xfIndex);
|
|
419
|
+
if (cell.value.kind === "blank" && background === void 0 && borders === void 0 && alignment === void 0 && verticalAlignment === void 0 && font === void 0) return;
|
|
386
420
|
const formatCode = formatCodeOf(globals, cell.xfIndex);
|
|
387
421
|
const value = resolveValue(cell, formatCode, globals.date1904);
|
|
388
422
|
const mapped = {
|
|
@@ -392,6 +426,7 @@ function mapCell(cell, globals) {
|
|
|
392
426
|
displayText: displayTextOf(value)
|
|
393
427
|
};
|
|
394
428
|
if (formatCode !== void 0) mapped.numberFormatCode = formatCode;
|
|
429
|
+
if (font !== void 0) mapped.font = font;
|
|
395
430
|
if (cell.formula !== void 0) mapped.formula = cell.formula;
|
|
396
431
|
if (background !== void 0) mapped.background = background;
|
|
397
432
|
if (borders !== void 0) mapped.borders = borders;
|
|
@@ -418,6 +453,17 @@ function alignmentOf(globals, xfIndex) {
|
|
|
418
453
|
if (format.alignment.vertical !== void 0) result.verticalAlignment = format.alignment.vertical;
|
|
419
454
|
return result;
|
|
420
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* A cell's own font, or undefined when the cell states none of its own: the font its XF's ifnt names, diffed against the workbook's own first font (the Normal style's, entry 0 of the font table) so that only properties the cell genuinely differs in survive -- the same default-omission policy alignmentOf applies to ALCGEN/ALCVBOT and the fill reader to FLSNULL. A cell whose XF resolves to no CellFormat at all, or whose font index resolves past the end of the font table, carries no font, matching every other resolveXOf helper's behaviour for an out-of-range index.
|
|
458
|
+
*/
|
|
459
|
+
function fontOf(globals, xfIndex) {
|
|
460
|
+
const format = globals.cellFormats[xfIndex];
|
|
461
|
+
if (format === void 0) return;
|
|
462
|
+
const font = globals.fonts[format.fontIndex];
|
|
463
|
+
const baseline = globals.fonts[0];
|
|
464
|
+
if (font === void 0 || baseline === void 0) return;
|
|
465
|
+
return contentFontOf(font, baseline, (icv) => resolveFontColor(icv, globals.palette));
|
|
466
|
+
}
|
|
421
467
|
/** A cell's own resolved per-side borders, or undefined when none of its four sides carry a border this reader resolves (no border at all, or a reserved/unrecognised BorderStyle token, or a colour this package cannot express as a fixed RGB value -- see xf-colors.ts's own resolveBorderEdge). */
|
|
422
468
|
function bordersOf(globals, xfIndex) {
|
|
423
469
|
const format = globals.cellFormats[xfIndex];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as FormulaSheetContext } from "./ptg-75v7MhaA.cjs";
|
|
2
1
|
import { t as RecordGroup } from "./substreams-XDNgDvRJ.cjs";
|
|
2
|
+
import { r as FormulaSheetContext } from "./ptg-75v7MhaA.cjs";
|
|
3
3
|
import { ContentSheetRange, SheetRuleOperator } from "document-schema.js";
|
|
4
4
|
//#region src/workbook/data-validation.d.ts
|
|
5
5
|
interface RawDataValidation {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as FormulaSheetContext } from "./ptg-75v7MhaA.js";
|
|
2
1
|
import { t as RecordGroup } from "./substreams-CgTHx5kX.js";
|
|
2
|
+
import { r as FormulaSheetContext } from "./ptg-75v7MhaA.js";
|
|
3
3
|
import { ContentSheetRange, SheetRuleOperator } from "document-schema.js";
|
|
4
4
|
//#region src/workbook/data-validation.d.ts
|
|
5
5
|
interface RawDataValidation {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as RecordGroup } from "./substreams-XDNgDvRJ.cjs";
|
|
2
|
+
import { r as FormulaSheetContext } from "./ptg-75v7MhaA.cjs";
|
|
3
|
+
import { ContentDefinedName } from "document-schema.js";
|
|
4
|
+
//#region src/workbook/defined-names.d.ts
|
|
5
|
+
/** One defined name as an Lbl record states it, before content.ts translates its scope. */
|
|
6
|
+
interface RawDefinedName {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
/** The formula text a spreadsheet application would show for the name's Refers To box, rebuilt from the record's own compiled Ptg stream by the same parser a cell formula's uses. */
|
|
9
|
+
readonly refersTo: string;
|
|
10
|
+
/** Zero-based index into the FULL BoundSheet8 collection ([MS-XLS] 2.4.150's itab is one-based); undefined for a workbook-scoped name (itab 0). */
|
|
11
|
+
readonly sheetIndex: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reads every Lbl record in a globals substream into a defined name, or skips it: the two print built-ins (print-names.ts owns them), a built-in index past the table above (no spelling to give it), a name whose rgce resolves to no formula text (a construct outside parseFormulaText's vocabulary, or a stream too malformed to walk -- ContentDefinedNameSchema requires refersTo, and a fabricated placeholder is not formula text), and a record whose own bytes overrun (caught per record rather than letting one malformed Lbl abort every other name, the identical per-record boundary sheet.ts's resolveFormulaText draws for a malformed cell formula).
|
|
15
|
+
*/
|
|
16
|
+
declare function readDefinedNames(records: readonly RecordGroup[], formulaSheets: FormulaSheetContext): readonly RawDefinedName[];
|
|
17
|
+
/** One Lbl record to write: the name (user-spelled, or a built-in index when the entry's name is an _xlnm spelling), the sheet it is scoped to, and the compiled token stream of what it refers to. */
|
|
18
|
+
interface DefinedNamePlanEntry {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** The built-in name index, when `name` is an _xlnm spelling this package knows -- undefined for a user-defined name. */
|
|
21
|
+
readonly builtinName: number | undefined;
|
|
22
|
+
/** Zero-based position in the document's own sheets array; undefined for a workbook-scoped name. */
|
|
23
|
+
readonly sheetIndex: number | undefined;
|
|
24
|
+
readonly rgce: Uint8Array<ArrayBuffer>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Compiles the document's defined names into the Lbl records the workbook stream carries.
|
|
28
|
+
*
|
|
29
|
+
* The refersTo vocabulary this writer can compile is exactly one sheet-qualified A1 reference -- `Sheet1!$A$1`, `Sheet1!$A$1:$B$2`, the sheet name quoted when it is not a bare identifier -- which is the shape every named range carries and the shape this package's own reader produces for one. A refersTo outside that vocabulary (a computed formula, a constant, an external-workbook reference) throws a BiffWriteError naming the construct rather than emitting a token stream this writer cannot prove round-trips, the identical refusal the cell-formula writer draws for the constructs outside its own vocabulary.
|
|
30
|
+
*/
|
|
31
|
+
declare function definedNameEntriesFor(names: readonly ContentDefinedName[], sheets: readonly {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
}[]): DefinedNamePlanEntry[];
|
|
34
|
+
/** One Lbl record ([MS-XLS] 2.4.150) for a planned defined name, the write-side mirror of readLblRecord above: grbit carries only fBuiltin when it is set, the Name is a compressed single character for a built-in and a real XLUnicodeStringNoCch otherwise, and itab restates the entry's scope one-based. */
|
|
35
|
+
declare function writeDefinedNameRecord(entry: DefinedNamePlanEntry): Uint8Array<ArrayBuffer>;
|
|
36
|
+
/** Every planned defined name as its own Lbl record, in the order given. */
|
|
37
|
+
declare function writeDefinedNameRecords(entries: readonly DefinedNamePlanEntry[]): Uint8Array<ArrayBuffer>[];
|
|
38
|
+
//#endregion
|
|
39
|
+
export { writeDefinedNameRecord as a, readDefinedNames as i, RawDefinedName as n, writeDefinedNameRecords as o, definedNameEntriesFor as r, DefinedNamePlanEntry as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as RecordGroup } from "./substreams-CgTHx5kX.js";
|
|
2
|
+
import { r as FormulaSheetContext } from "./ptg-75v7MhaA.js";
|
|
3
|
+
import { ContentDefinedName } from "document-schema.js";
|
|
4
|
+
//#region src/workbook/defined-names.d.ts
|
|
5
|
+
/** One defined name as an Lbl record states it, before content.ts translates its scope. */
|
|
6
|
+
interface RawDefinedName {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
/** The formula text a spreadsheet application would show for the name's Refers To box, rebuilt from the record's own compiled Ptg stream by the same parser a cell formula's uses. */
|
|
9
|
+
readonly refersTo: string;
|
|
10
|
+
/** Zero-based index into the FULL BoundSheet8 collection ([MS-XLS] 2.4.150's itab is one-based); undefined for a workbook-scoped name (itab 0). */
|
|
11
|
+
readonly sheetIndex: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Reads every Lbl record in a globals substream into a defined name, or skips it: the two print built-ins (print-names.ts owns them), a built-in index past the table above (no spelling to give it), a name whose rgce resolves to no formula text (a construct outside parseFormulaText's vocabulary, or a stream too malformed to walk -- ContentDefinedNameSchema requires refersTo, and a fabricated placeholder is not formula text), and a record whose own bytes overrun (caught per record rather than letting one malformed Lbl abort every other name, the identical per-record boundary sheet.ts's resolveFormulaText draws for a malformed cell formula).
|
|
15
|
+
*/
|
|
16
|
+
declare function readDefinedNames(records: readonly RecordGroup[], formulaSheets: FormulaSheetContext): readonly RawDefinedName[];
|
|
17
|
+
/** One Lbl record to write: the name (user-spelled, or a built-in index when the entry's name is an _xlnm spelling), the sheet it is scoped to, and the compiled token stream of what it refers to. */
|
|
18
|
+
interface DefinedNamePlanEntry {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
/** The built-in name index, when `name` is an _xlnm spelling this package knows -- undefined for a user-defined name. */
|
|
21
|
+
readonly builtinName: number | undefined;
|
|
22
|
+
/** Zero-based position in the document's own sheets array; undefined for a workbook-scoped name. */
|
|
23
|
+
readonly sheetIndex: number | undefined;
|
|
24
|
+
readonly rgce: Uint8Array<ArrayBuffer>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Compiles the document's defined names into the Lbl records the workbook stream carries.
|
|
28
|
+
*
|
|
29
|
+
* The refersTo vocabulary this writer can compile is exactly one sheet-qualified A1 reference -- `Sheet1!$A$1`, `Sheet1!$A$1:$B$2`, the sheet name quoted when it is not a bare identifier -- which is the shape every named range carries and the shape this package's own reader produces for one. A refersTo outside that vocabulary (a computed formula, a constant, an external-workbook reference) throws a BiffWriteError naming the construct rather than emitting a token stream this writer cannot prove round-trips, the identical refusal the cell-formula writer draws for the constructs outside its own vocabulary.
|
|
30
|
+
*/
|
|
31
|
+
declare function definedNameEntriesFor(names: readonly ContentDefinedName[], sheets: readonly {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
}[]): DefinedNamePlanEntry[];
|
|
34
|
+
/** One Lbl record ([MS-XLS] 2.4.150) for a planned defined name, the write-side mirror of readLblRecord above: grbit carries only fBuiltin when it is set, the Name is a compressed single character for a built-in and a real XLUnicodeStringNoCch otherwise, and itab restates the entry's scope one-based. */
|
|
35
|
+
declare function writeDefinedNameRecord(entry: DefinedNamePlanEntry): Uint8Array<ArrayBuffer>;
|
|
36
|
+
/** Every planned defined name as its own Lbl record, in the order given. */
|
|
37
|
+
declare function writeDefinedNameRecords(entries: readonly DefinedNamePlanEntry[]): Uint8Array<ArrayBuffer>[];
|
|
38
|
+
//#endregion
|
|
39
|
+
export { writeDefinedNameRecord as a, readDefinedNames as i, RawDefinedName as n, writeDefinedNameRecords as o, definedNameEntriesFor as r, DefinedNamePlanEntry as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as RecordGroup } from "./substreams-XDNgDvRJ.cjs";
|
|
2
|
+
import { Color, ContentFont } from "document-schema.js";
|
|
3
|
+
//#region src/biff/font.d.ts
|
|
4
|
+
/** icv's own "Automatic"/System Window Text special value ([MS-XLS] "IcvFont": the one value outside the 0x08-0x3F palette range a font colour may legally carry) -- the colour a font that states none of its own carries, and the one this package's writer emits for a ContentFont leaving color absent. Deliberately NOT resolved on read: "automatic" means "whatever the display settings say", a moving target with no fixed RGB triple, matching how the fill reader treats an Automatic icv as no colour at all. */
|
|
5
|
+
declare const FONT_COLOR_AUTOMATIC = 32767;
|
|
6
|
+
/**
|
|
7
|
+
* The font-table entry a ContentFont resolves to, for every property it leaves absent or false: the Normal style's own value, Excel 97-2003's classic Arial 10pt with no flags and an Automatic colour. Entry 0 of every font table this package writes carries exactly these fields, so a cell whose ContentFont normalises back to them references font 0 and needs no entry of its own -- the write-side mirror of the read side diffing every cell font against entry 0.
|
|
8
|
+
*/
|
|
9
|
+
declare const NORMAL_FONT_FIELDS: XfFontFields;
|
|
10
|
+
/**
|
|
11
|
+
* One Font record's own fields, in the record's own vocabulary. A cell-level font is derived from it by diffing against the workbook's own first font (contentFontOf below), never by reading the fields off as absolute: BIFF8 gives a cell no way to say "no font", only an index into the font table, so the table's entry 0 (the Normal style's font, [MS-XLS] 2.1.7.20.3's own FORMATTING production) is what "the format's default" concretely means for a given file.
|
|
12
|
+
*/
|
|
13
|
+
interface XfFontFields {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly heightTwips: number;
|
|
16
|
+
readonly bold: boolean;
|
|
17
|
+
readonly italic: boolean;
|
|
18
|
+
readonly strikeout: boolean;
|
|
19
|
+
readonly underline: boolean;
|
|
20
|
+
readonly colorIcv: number;
|
|
21
|
+
}
|
|
22
|
+
/** Font ([MS-XLS] 2.4.122): dyHeight, grbit, icv, bls, sss, uls, bFamily, bCharSet, unused3, then the name as a ShortXLUnicodeString whose fHighByte MUST be 1 regardless of the name's own content. */
|
|
23
|
+
declare function readFontRecord(record: RecordGroup): XfFontFields;
|
|
24
|
+
/**
|
|
25
|
+
* The cell-level font one font-table entry resolves to, as ContentSheetCell.font carries it: only the properties that DIFFER from the workbook's own first font, or undefined when the entry is that font outright -- the format's default, which the schema models as the field being absent rather than an explicitly restated copy of it.
|
|
26
|
+
*
|
|
27
|
+
* The diff is per property, since a real cell font usually differs from the default in one or two respects and agrees in the rest: a Courier-bold cell font against an Arial default yields { fontFamily: "Courier", bold: true } and says nothing about size, which the default already settles. A colour that differs from the default's but does not resolve to a fixed RGB (the Automatic sentinel, a chart/tooltip display colour) is left unstated for the same reason resolveIcvColor declines it everywhere else: there is no honest triple to write. The icv comparison is on the raw index rather than the resolved colour, so a cell font carrying the SAME index as the default states no colour even where that index resolves -- the file said "the same colour as the default", not a colour that happens to coincide.
|
|
28
|
+
*/
|
|
29
|
+
declare function contentFontOf(font: XfFontFields, baseline: XfFontFields, resolveColor: (icv: number) => Color | undefined): ContentFont | undefined;
|
|
30
|
+
/** Resolves a font colour icv through the same Icv table machinery a fill or border colour already uses -- IcvFont ([MS-XLS] "IcvFont") is an Icv constrained to the palette range plus the Automatic sentinel, so the shared resolver covers it without a second copy. */
|
|
31
|
+
declare function resolveFontColor(icv: number, palette: readonly Color[] | undefined): Color | undefined;
|
|
32
|
+
/** The write-side mirror of readFontRecord: the identical layout in the opposite direction, in the one place the read side already cites. dyHeight's own 20-8191 range and fontName's own 1-31 length are the record's stated MUSTs, so a ContentFont asking for something outside them is refused here rather than silently clipped into a spec-illegal byte sequence. */
|
|
33
|
+
declare function writeFontRecord(fields: XfFontFields): Uint8Array<ArrayBuffer>;
|
|
34
|
+
/**
|
|
35
|
+
* The font-table entry a ContentSheetCell.font resolves to: every property it leaves absent or false takes the Normal font's own value, since the schema models an absent property as "the format's default" and entry 0 of the table is exactly that default. `icvOf` resolves a stated colour into the workbook's own colour plan, the identical resolution a fill or border colour already draws.
|
|
36
|
+
*/
|
|
37
|
+
declare function xfFontFieldsOf(font: ContentFont | undefined, icvOf: (color: Color) => number): XfFontFields;
|
|
38
|
+
/**
|
|
39
|
+
* Whether a ContentSheetCell.font resolves to anything other than the Normal font's own fields -- the "does this font carry formatting at all" question every write-side pass shares (written-cells.ts's record predicate, write.ts's font-table and XF interning). Answered through the identical normalisation xfFontFieldsOf applies, so a font that merely restates a default value -- fontFamily "Arial" on a workbook whose default is Arial, or sizePt 10 -- counts as none, exactly as the read side's diff against font-table entry 0 already treats it.
|
|
40
|
+
*
|
|
41
|
+
* A stated colour always differs, because the Normal entry's own colour is the Automatic sentinel, which no palette resolution ever returns (a resolved icv is always a real table index), so the comparison needs no colour plan of its own.
|
|
42
|
+
*/
|
|
43
|
+
declare function cellFontDiffersFromNormal(font: ContentFont): boolean;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { contentFontOf as a, writeFontRecord as c, cellFontDiffersFromNormal as i, xfFontFieldsOf as l, NORMAL_FONT_FIELDS as n, readFontRecord as o, XfFontFields as r, resolveFontColor as s, FONT_COLOR_AUTOMATIC as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as RecordGroup } from "./substreams-CgTHx5kX.js";
|
|
2
|
+
import { Color, ContentFont } from "document-schema.js";
|
|
3
|
+
//#region src/biff/font.d.ts
|
|
4
|
+
/** icv's own "Automatic"/System Window Text special value ([MS-XLS] "IcvFont": the one value outside the 0x08-0x3F palette range a font colour may legally carry) -- the colour a font that states none of its own carries, and the one this package's writer emits for a ContentFont leaving color absent. Deliberately NOT resolved on read: "automatic" means "whatever the display settings say", a moving target with no fixed RGB triple, matching how the fill reader treats an Automatic icv as no colour at all. */
|
|
5
|
+
declare const FONT_COLOR_AUTOMATIC = 32767;
|
|
6
|
+
/**
|
|
7
|
+
* The font-table entry a ContentFont resolves to, for every property it leaves absent or false: the Normal style's own value, Excel 97-2003's classic Arial 10pt with no flags and an Automatic colour. Entry 0 of every font table this package writes carries exactly these fields, so a cell whose ContentFont normalises back to them references font 0 and needs no entry of its own -- the write-side mirror of the read side diffing every cell font against entry 0.
|
|
8
|
+
*/
|
|
9
|
+
declare const NORMAL_FONT_FIELDS: XfFontFields;
|
|
10
|
+
/**
|
|
11
|
+
* One Font record's own fields, in the record's own vocabulary. A cell-level font is derived from it by diffing against the workbook's own first font (contentFontOf below), never by reading the fields off as absolute: BIFF8 gives a cell no way to say "no font", only an index into the font table, so the table's entry 0 (the Normal style's font, [MS-XLS] 2.1.7.20.3's own FORMATTING production) is what "the format's default" concretely means for a given file.
|
|
12
|
+
*/
|
|
13
|
+
interface XfFontFields {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly heightTwips: number;
|
|
16
|
+
readonly bold: boolean;
|
|
17
|
+
readonly italic: boolean;
|
|
18
|
+
readonly strikeout: boolean;
|
|
19
|
+
readonly underline: boolean;
|
|
20
|
+
readonly colorIcv: number;
|
|
21
|
+
}
|
|
22
|
+
/** Font ([MS-XLS] 2.4.122): dyHeight, grbit, icv, bls, sss, uls, bFamily, bCharSet, unused3, then the name as a ShortXLUnicodeString whose fHighByte MUST be 1 regardless of the name's own content. */
|
|
23
|
+
declare function readFontRecord(record: RecordGroup): XfFontFields;
|
|
24
|
+
/**
|
|
25
|
+
* The cell-level font one font-table entry resolves to, as ContentSheetCell.font carries it: only the properties that DIFFER from the workbook's own first font, or undefined when the entry is that font outright -- the format's default, which the schema models as the field being absent rather than an explicitly restated copy of it.
|
|
26
|
+
*
|
|
27
|
+
* The diff is per property, since a real cell font usually differs from the default in one or two respects and agrees in the rest: a Courier-bold cell font against an Arial default yields { fontFamily: "Courier", bold: true } and says nothing about size, which the default already settles. A colour that differs from the default's but does not resolve to a fixed RGB (the Automatic sentinel, a chart/tooltip display colour) is left unstated for the same reason resolveIcvColor declines it everywhere else: there is no honest triple to write. The icv comparison is on the raw index rather than the resolved colour, so a cell font carrying the SAME index as the default states no colour even where that index resolves -- the file said "the same colour as the default", not a colour that happens to coincide.
|
|
28
|
+
*/
|
|
29
|
+
declare function contentFontOf(font: XfFontFields, baseline: XfFontFields, resolveColor: (icv: number) => Color | undefined): ContentFont | undefined;
|
|
30
|
+
/** Resolves a font colour icv through the same Icv table machinery a fill or border colour already uses -- IcvFont ([MS-XLS] "IcvFont") is an Icv constrained to the palette range plus the Automatic sentinel, so the shared resolver covers it without a second copy. */
|
|
31
|
+
declare function resolveFontColor(icv: number, palette: readonly Color[] | undefined): Color | undefined;
|
|
32
|
+
/** The write-side mirror of readFontRecord: the identical layout in the opposite direction, in the one place the read side already cites. dyHeight's own 20-8191 range and fontName's own 1-31 length are the record's stated MUSTs, so a ContentFont asking for something outside them is refused here rather than silently clipped into a spec-illegal byte sequence. */
|
|
33
|
+
declare function writeFontRecord(fields: XfFontFields): Uint8Array<ArrayBuffer>;
|
|
34
|
+
/**
|
|
35
|
+
* The font-table entry a ContentSheetCell.font resolves to: every property it leaves absent or false takes the Normal font's own value, since the schema models an absent property as "the format's default" and entry 0 of the table is exactly that default. `icvOf` resolves a stated colour into the workbook's own colour plan, the identical resolution a fill or border colour already draws.
|
|
36
|
+
*/
|
|
37
|
+
declare function xfFontFieldsOf(font: ContentFont | undefined, icvOf: (color: Color) => number): XfFontFields;
|
|
38
|
+
/**
|
|
39
|
+
* Whether a ContentSheetCell.font resolves to anything other than the Normal font's own fields -- the "does this font carry formatting at all" question every write-side pass shares (written-cells.ts's record predicate, write.ts's font-table and XF interning). Answered through the identical normalisation xfFontFieldsOf applies, so a font that merely restates a default value -- fontFamily "Arial" on a workbook whose default is Arial, or sizePt 10 -- counts as none, exactly as the read side's diff against font-table entry 0 already treats it.
|
|
40
|
+
*
|
|
41
|
+
* A stated colour always differs, because the Normal entry's own colour is the Automatic sentinel, which no palette resolution ever returns (a resolved icv is always a real table index), so the comparison needs no colour plan of its own.
|
|
42
|
+
*/
|
|
43
|
+
declare function cellFontDiffersFromNormal(font: ContentFont): boolean;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { contentFontOf as a, writeFontRecord as c, cellFontDiffersFromNormal as i, xfFontFieldsOf as l, NORMAL_FONT_FIELDS as n, readFontRecord as o, XfFontFields as r, resolveFontColor as s, FONT_COLOR_AUTOMATIC as t };
|
package/dist/index.cjs
CHANGED
|
@@ -3,20 +3,20 @@ const require_biff_record_types = require("./biff/record-types.cjs");
|
|
|
3
3
|
const require_biff_records = require("./biff/records.cjs");
|
|
4
4
|
const require_container = require("./container.cjs");
|
|
5
5
|
const require_units = require("./units.cjs");
|
|
6
|
-
const
|
|
6
|
+
const require_biff_builder = require("./biff/builder.cjs");
|
|
7
7
|
const require_biff_cursor = require("./biff/cursor.cjs");
|
|
8
|
+
const require_biff_write_errors = require("./biff/write-errors.cjs");
|
|
9
|
+
const require_biff_record_writer = require("./biff/record-writer.cjs");
|
|
8
10
|
const require_biff_strings = require("./biff/strings.cjs");
|
|
11
|
+
const require_biff_substreams = require("./biff/substreams.cjs");
|
|
9
12
|
const require_biff_errors = require("./biff/errors.cjs");
|
|
10
|
-
const
|
|
13
|
+
const require_biff_string_writer = require("./biff/string-writer.cjs");
|
|
11
14
|
const require_serial = require("./serial.cjs");
|
|
12
|
-
const require_biff_builder = require("./biff/builder.cjs");
|
|
13
|
-
const require_biff_record_writer = require("./biff/record-writer.cjs");
|
|
14
15
|
const require_workbook_globals = require("./workbook/globals.cjs");
|
|
15
16
|
const require_biff_rk = require("./biff/rk.cjs");
|
|
16
17
|
const require_workbook_sheet = require("./workbook/sheet.cjs");
|
|
17
18
|
const require_content = require("./content.cjs");
|
|
18
19
|
const require_biff_bof_writer = require("./biff/bof-writer.cjs");
|
|
19
|
-
const require_biff_string_writer = require("./biff/string-writer.cjs");
|
|
20
20
|
const require_biff_xf_writer = require("./biff/xf-writer.cjs");
|
|
21
21
|
const require_metadata = require("./metadata.cjs");
|
|
22
22
|
const require_workbook_globals_writer = require("./workbook/globals-writer.cjs");
|
|
@@ -146,7 +146,6 @@ exports.splitSubstreams = require_biff_substreams.splitSubstreams;
|
|
|
146
146
|
exports.twipsToPoints = require_units.twipsToPoints;
|
|
147
147
|
exports.writeBofData = require_biff_bof_writer.writeBofData;
|
|
148
148
|
exports.writeCellXfRecord = require_biff_xf_writer.writeCellXfRecord;
|
|
149
|
-
exports.writeFontRecord = require_biff_xf_writer.writeFontRecord;
|
|
150
149
|
exports.writeFormatRecord = require_biff_xf_writer.writeFormatRecord;
|
|
151
150
|
exports.writePaletteRecord = require_biff_xf_writer.writePaletteRecord;
|
|
152
151
|
exports.writeRecord = require_biff_record_writer.writeRecord;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,15 +2,15 @@ import { writeBofData } from "./biff/bof-writer.cjs";
|
|
|
2
2
|
import { RecordBuilder } from "./biff/builder.cjs";
|
|
3
3
|
import { t as BlockCursor } from "./cursor-CnEuX5qE.cjs";
|
|
4
4
|
import { errorCodeOf, errorTextOf } from "./biff/errors.cjs";
|
|
5
|
+
import { i as readRecords, n as BiffRecord, r as HEADER_SIZE, t as BiffFormatError } from "./records-G82UEVq8.cjs";
|
|
6
|
+
import { a as splitSubstreams, i as recordByteLength, n as Substream, r as groupRecords, t as RecordGroup } from "./substreams-XDNgDvRJ.cjs";
|
|
5
7
|
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF } from "./biff/record-types.cjs";
|
|
6
8
|
import { concatRecords, writeRecord } from "./biff/record-writer.cjs";
|
|
7
|
-
import { i as readRecords, n as BiffRecord, r as HEADER_SIZE, t as BiffFormatError } from "./records-G82UEVq8.cjs";
|
|
8
9
|
import { decodeRkNumber } from "./biff/rk.cjs";
|
|
9
10
|
import { writeRichExtendedString, writeShortXLUnicodeString, writeXLUnicodeString, writeXLUnicodeStringNoCch } from "./biff/string-writer.cjs";
|
|
10
11
|
import { readRichExtendedString, readShortXLUnicodeString, readXLUnicodeString, readXLUnicodeStringNoCch } from "./biff/strings.cjs";
|
|
11
|
-
import { a as splitSubstreams, i as recordByteLength, n as Substream, r as groupRecords, t as RecordGroup } from "./substreams-XDNgDvRJ.cjs";
|
|
12
12
|
import { BiffWriteError } from "./biff/write-errors.cjs";
|
|
13
|
-
import { writeCellXfRecord,
|
|
13
|
+
import { writeCellXfRecord, writeFormatRecord, writePaletteRecord, writeStyleRecord, writeStyleXfRecord } from "./biff/xf-writer.cjs";
|
|
14
14
|
import { SUMMARY_INFORMATION_STREAM, WorkbookStreams, isXlsFile, readWorkbookStreams } from "./container.cjs";
|
|
15
15
|
import { XlsContentDocument, readXls, readXlsContent } from "./content.cjs";
|
|
16
16
|
import { layoutMetadataToSummaryInformation } from "./metadata.cjs";
|
|
@@ -22,4 +22,4 @@ import { RawCell, RawCellValue, RawColumn, RawPrintSettings, RawRange, RawRow, R
|
|
|
22
22
|
import { SheetWriteContext, buildWorksheetSubstream } from "./workbook/sheet-writer.cjs";
|
|
23
23
|
import { writeXls, writeXlsContent } from "./write.cjs";
|
|
24
24
|
export * from "excel-number-format";
|
|
25
|
-
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffRecord, BiffWriteError, BlockCursor, CellFormat, CellXfPlanEntry, DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF, RawCell, RawCellValue, RawColumn, RawPrintSettings, RawRange, RawRow, RawSheet, RecordBuilder, RecordGroup, SUMMARY_INFORMATION_STREAM, SheetEntry, SheetWriteContext, Substream, WorkbookGlobals, WorkbookGlobalsBuild, WorkbookGlobalsPlan, WorkbookStreams, XlsContentDocument, buildWorkbookGlobals, buildWorksheetSubstream, columnWidthToPoints, concatRecords, decodeRkNumber, errorCodeOf, errorTextOf, formatCodeOf, groupRecords, inchesToPoints, isXlsFile, isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, layoutMetadataToSummaryInformation, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, readRecords, readRichExtendedString, readSheetRecords, readShortXLUnicodeString, readWorkbookGlobals, readWorkbookStreams, readXLUnicodeString, readXLUnicodeStringNoCch, readXls, readXlsContent, recordByteLength, serialToIsoDate, serialToIsoDateTime, serialToIsoTime, splitSubstreams, twipsToPoints, writeBofData, writeCellXfRecord,
|
|
25
|
+
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffRecord, BiffWriteError, BlockCursor, CellFormat, CellXfPlanEntry, DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF, RawCell, RawCellValue, RawColumn, RawPrintSettings, RawRange, RawRow, RawSheet, RecordBuilder, RecordGroup, SUMMARY_INFORMATION_STREAM, SheetEntry, SheetWriteContext, Substream, WorkbookGlobals, WorkbookGlobalsBuild, WorkbookGlobalsPlan, WorkbookStreams, XlsContentDocument, buildWorkbookGlobals, buildWorksheetSubstream, columnWidthToPoints, concatRecords, decodeRkNumber, errorCodeOf, errorTextOf, formatCodeOf, groupRecords, inchesToPoints, isXlsFile, isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, layoutMetadataToSummaryInformation, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, readRecords, readRichExtendedString, readSheetRecords, readShortXLUnicodeString, readWorkbookGlobals, readWorkbookStreams, readXLUnicodeString, readXLUnicodeStringNoCch, readXls, readXlsContent, recordByteLength, serialToIsoDate, serialToIsoDateTime, serialToIsoTime, splitSubstreams, twipsToPoints, writeBofData, writeCellXfRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXLUnicodeStringNoCch, writeXls, writeXlsContent };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import { writeBofData } from "./biff/bof-writer.js";
|
|
|
2
2
|
import { RecordBuilder } from "./biff/builder.js";
|
|
3
3
|
import { t as BlockCursor } from "./cursor-CnEuX5qE.js";
|
|
4
4
|
import { errorCodeOf, errorTextOf } from "./biff/errors.js";
|
|
5
|
+
import { i as readRecords, n as BiffRecord, r as HEADER_SIZE, t as BiffFormatError } from "./records-G82UEVq8.js";
|
|
6
|
+
import { a as splitSubstreams, i as recordByteLength, n as Substream, r as groupRecords, t as RecordGroup } from "./substreams-CgTHx5kX.js";
|
|
5
7
|
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF } from "./biff/record-types.js";
|
|
6
8
|
import { concatRecords, writeRecord } from "./biff/record-writer.js";
|
|
7
|
-
import { i as readRecords, n as BiffRecord, r as HEADER_SIZE, t as BiffFormatError } from "./records-G82UEVq8.js";
|
|
8
9
|
import { decodeRkNumber } from "./biff/rk.js";
|
|
9
10
|
import { writeRichExtendedString, writeShortXLUnicodeString, writeXLUnicodeString, writeXLUnicodeStringNoCch } from "./biff/string-writer.js";
|
|
10
11
|
import { readRichExtendedString, readShortXLUnicodeString, readXLUnicodeString, readXLUnicodeStringNoCch } from "./biff/strings.js";
|
|
11
|
-
import { a as splitSubstreams, i as recordByteLength, n as Substream, r as groupRecords, t as RecordGroup } from "./substreams-CgTHx5kX.js";
|
|
12
12
|
import { BiffWriteError } from "./biff/write-errors.js";
|
|
13
|
-
import { writeCellXfRecord,
|
|
13
|
+
import { writeCellXfRecord, writeFormatRecord, writePaletteRecord, writeStyleRecord, writeStyleXfRecord } from "./biff/xf-writer.js";
|
|
14
14
|
import { SUMMARY_INFORMATION_STREAM, WorkbookStreams, isXlsFile, readWorkbookStreams } from "./container.js";
|
|
15
15
|
import { XlsContentDocument, readXls, readXlsContent } from "./content.js";
|
|
16
16
|
import { layoutMetadataToSummaryInformation } from "./metadata.js";
|
|
@@ -22,4 +22,4 @@ import { RawCell, RawCellValue, RawColumn, RawPrintSettings, RawRange, RawRow, R
|
|
|
22
22
|
import { SheetWriteContext, buildWorksheetSubstream } from "./workbook/sheet-writer.js";
|
|
23
23
|
import { writeXls, writeXlsContent } from "./write.js";
|
|
24
24
|
export * from "excel-number-format";
|
|
25
|
-
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffRecord, BiffWriteError, BlockCursor, CellFormat, CellXfPlanEntry, DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF, RawCell, RawCellValue, RawColumn, RawPrintSettings, RawRange, RawRow, RawSheet, RecordBuilder, RecordGroup, SUMMARY_INFORMATION_STREAM, SheetEntry, SheetWriteContext, Substream, WorkbookGlobals, WorkbookGlobalsBuild, WorkbookGlobalsPlan, WorkbookStreams, XlsContentDocument, buildWorkbookGlobals, buildWorksheetSubstream, columnWidthToPoints, concatRecords, decodeRkNumber, errorCodeOf, errorTextOf, formatCodeOf, groupRecords, inchesToPoints, isXlsFile, isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, layoutMetadataToSummaryInformation, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, readRecords, readRichExtendedString, readSheetRecords, readShortXLUnicodeString, readWorkbookGlobals, readWorkbookStreams, readXLUnicodeString, readXLUnicodeStringNoCch, readXls, readXlsContent, recordByteLength, serialToIsoDate, serialToIsoDateTime, serialToIsoTime, splitSubstreams, twipsToPoints, writeBofData, writeCellXfRecord,
|
|
25
|
+
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffRecord, BiffWriteError, BlockCursor, CellFormat, CellXfPlanEntry, DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF, RawCell, RawCellValue, RawColumn, RawPrintSettings, RawRange, RawRow, RawSheet, RecordBuilder, RecordGroup, SUMMARY_INFORMATION_STREAM, SheetEntry, SheetWriteContext, Substream, WorkbookGlobals, WorkbookGlobalsBuild, WorkbookGlobalsPlan, WorkbookStreams, XlsContentDocument, buildWorkbookGlobals, buildWorksheetSubstream, columnWidthToPoints, concatRecords, decodeRkNumber, errorCodeOf, errorTextOf, formatCodeOf, groupRecords, inchesToPoints, isXlsFile, isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, layoutMetadataToSummaryInformation, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, readRecords, readRichExtendedString, readSheetRecords, readShortXLUnicodeString, readWorkbookGlobals, readWorkbookStreams, readXLUnicodeString, readXLUnicodeStringNoCch, readXls, readXlsContent, recordByteLength, serialToIsoDate, serialToIsoDateTime, serialToIsoTime, splitSubstreams, twipsToPoints, writeBofData, writeCellXfRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXLUnicodeStringNoCch, writeXls, writeXlsContent };
|
package/dist/index.js
CHANGED
|
@@ -2,24 +2,24 @@ import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_T
|
|
|
2
2
|
import { BiffFormatError, HEADER_SIZE, readRecords } from "./biff/records.js";
|
|
3
3
|
import { SUMMARY_INFORMATION_STREAM, isXlsFile, readWorkbookStreams } from "./container.js";
|
|
4
4
|
import { DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, columnWidthToPoints, inchesToPoints, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, twipsToPoints } from "./units.js";
|
|
5
|
-
import {
|
|
5
|
+
import { RecordBuilder } from "./biff/builder.js";
|
|
6
6
|
import { BlockCursor } from "./biff/cursor.js";
|
|
7
|
+
import { BiffWriteError } from "./biff/write-errors.js";
|
|
8
|
+
import { concatRecords, writeRecord } from "./biff/record-writer.js";
|
|
7
9
|
import { readRichExtendedString, readShortXLUnicodeString, readXLUnicodeString, readXLUnicodeStringNoCch } from "./biff/strings.js";
|
|
10
|
+
import { groupRecords, recordByteLength, splitSubstreams } from "./biff/substreams.js";
|
|
8
11
|
import { errorCodeOf, errorTextOf } from "./biff/errors.js";
|
|
9
|
-
import {
|
|
12
|
+
import { writeRichExtendedString, writeShortXLUnicodeString, writeXLUnicodeString, writeXLUnicodeStringNoCch } from "./biff/string-writer.js";
|
|
10
13
|
import { isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, serialToIsoDate, serialToIsoDateTime, serialToIsoTime } from "./serial.js";
|
|
11
|
-
import { RecordBuilder } from "./biff/builder.js";
|
|
12
|
-
import { concatRecords, writeRecord } from "./biff/record-writer.js";
|
|
13
14
|
import { formatCodeOf, readWorkbookGlobals } from "./workbook/globals.js";
|
|
14
15
|
import { decodeRkNumber } from "./biff/rk.js";
|
|
15
16
|
import { readSheetRecords } from "./workbook/sheet.js";
|
|
16
17
|
import { readXls, readXlsContent } from "./content.js";
|
|
17
18
|
import { writeBofData } from "./biff/bof-writer.js";
|
|
18
|
-
import {
|
|
19
|
-
import { writeCellXfRecord, writeFontRecord, writeFormatRecord, writePaletteRecord, writeStyleRecord, writeStyleXfRecord } from "./biff/xf-writer.js";
|
|
19
|
+
import { writeCellXfRecord, writeFormatRecord, writePaletteRecord, writeStyleRecord, writeStyleXfRecord } from "./biff/xf-writer.js";
|
|
20
20
|
import { layoutMetadataToSummaryInformation } from "./metadata.js";
|
|
21
21
|
import { GENERAL_CELL_XF_INDEX, buildWorkbookGlobals } from "./workbook/globals-writer.js";
|
|
22
22
|
import { buildWorksheetSubstream } from "./workbook/sheet-writer.js";
|
|
23
23
|
import { writeXls, writeXlsContent } from "./write.js";
|
|
24
24
|
export * from "excel-number-format";
|
|
25
|
-
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffWriteError, BlockCursor, DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF, RecordBuilder, SUMMARY_INFORMATION_STREAM, buildWorkbookGlobals, buildWorksheetSubstream, columnWidthToPoints, concatRecords, decodeRkNumber, errorCodeOf, errorTextOf, formatCodeOf, groupRecords, inchesToPoints, isXlsFile, isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, layoutMetadataToSummaryInformation, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, readRecords, readRichExtendedString, readSheetRecords, readShortXLUnicodeString, readWorkbookGlobals, readWorkbookStreams, readXLUnicodeString, readXLUnicodeStringNoCch, readXls, readXlsContent, recordByteLength, serialToIsoDate, serialToIsoDateTime, serialToIsoTime, splitSubstreams, twipsToPoints, writeBofData, writeCellXfRecord,
|
|
25
|
+
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffWriteError, BlockCursor, DEFAULT_COLUMN_WIDTH_CHARS, DEFAULT_ROW_HEIGHT_PT, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, RECORD_AI, RECORD_ARRAY, RECORD_BLANK, RECORD_BOF, RECORD_BOOLERR, RECORD_BOTTOMMARGIN, RECORD_BOUNDSHEET8, RECORD_CALCCOUNT, RECORD_CALCDELTA, RECORD_CALCITER, RECORD_CALCREFMODE, RECORD_CALCSAVERECALC, RECORD_CF, RECORD_CF12, RECORD_CFEX, RECORD_COLINFO, RECORD_CONDFMT, RECORD_CONDFMT12, RECORD_CONTINUE, RECORD_CONTINUEFRT12, RECORD_DATE1904, RECORD_DEFAULTROWHEIGHT, RECORD_DEFCOLWIDTH, RECORD_DIMENSIONS, RECORD_DV, RECORD_DVAL, RECORD_EOF, RECORD_EXTERNSHEET, RECORD_FILELOCK, RECORD_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_INTERFACEHDR, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MSODRAWING, RECORD_MSODRAWINGGROUP, RECORD_MSODRAWINGSELECTION, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_RRDHEAD, RECORD_RRDINFO, RECORD_SERIES, RECORD_SERIESTEXT, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SIINDEX, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_USREXCL, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF, RecordBuilder, SUMMARY_INFORMATION_STREAM, buildWorkbookGlobals, buildWorksheetSubstream, columnWidthToPoints, concatRecords, decodeRkNumber, errorCodeOf, errorTextOf, formatCodeOf, groupRecords, inchesToPoints, isXlsFile, isoDateTimeToSerial, isoDateToSerial, isoTimeToSerial, layoutMetadataToSummaryInformation, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, readRecords, readRichExtendedString, readSheetRecords, readShortXLUnicodeString, readWorkbookGlobals, readWorkbookStreams, readXLUnicodeString, readXLUnicodeStringNoCch, readXls, readXlsContent, recordByteLength, serialToIsoDate, serialToIsoDateTime, serialToIsoTime, splitSubstreams, twipsToPoints, writeBofData, writeCellXfRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXLUnicodeStringNoCch, writeXls, writeXlsContent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.cjs";
|
|
2
1
|
import { t as RecordGroup } from "../substreams-XDNgDvRJ.cjs";
|
|
2
|
+
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.cjs";
|
|
3
3
|
import { ContentSheetCell } from "document-schema.js";
|
|
4
4
|
//#region src/workbook/chart.d.ts
|
|
5
5
|
/** One resolved series: its own name (undefined when neither a SeriesText cache nor a literal/same-sheet-resolvable AI id=0 named it) and its category/value points, in point order, verbatim source text (a cache or a resolved cell's own displayText) -- exactly what readChartTable's own ChartSeries carries for the xlsx/pptx case, so chartCells below can build the identical flattened-table shape. A point this reader cannot resolve at all -- a cross-sheet or external reference with no cache entry, an unsupported AI token -- is an empty string, matching readChartTable's own "absent or empty-text label/value reads as an empty cell" convention. */
|
package/dist/workbook/chart.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.js";
|
|
2
1
|
import { t as RecordGroup } from "../substreams-CgTHx5kX.js";
|
|
2
|
+
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.js";
|
|
3
3
|
import { ContentSheetCell } from "document-schema.js";
|
|
4
4
|
//#region src/workbook/chart.d.ts
|
|
5
5
|
/** One resolved series: its own name (undefined when neither a SeriesText cache nor a literal/same-sheet-resolvable AI id=0 named it) and its category/value points, in point order, verbatim source text (a cache or a resolved cell's own displayText) -- exactly what readChartTable's own ChartSeries carries for the xlsx/pptx case, so chartCells below can build the identical flattened-table shape. A point this reader cannot resolve at all -- a cross-sheet or external reference with no cache entry, an unsupported AI token -- is an empty string, matching readChartTable's own "absent or empty-text label/value reads as an empty cell" convention. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../biff/record-types.cjs");
|
|
3
|
-
const require_biff_write_errors = require("../biff/write-errors.cjs");
|
|
4
3
|
const require_biff_builder = require("../biff/builder.cjs");
|
|
4
|
+
const require_biff_write_errors = require("../biff/write-errors.cjs");
|
|
5
5
|
const require_biff_record_writer = require("../biff/record-writer.cjs");
|
|
6
6
|
const require_biff_string_writer = require("../biff/string-writer.cjs");
|
|
7
7
|
//#region src/workbook/comment-writer.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../biff/record-types.js";
|
|
2
|
-
import { BiffWriteError } from "../biff/write-errors.js";
|
|
3
2
|
import { RecordBuilder } from "../biff/builder.js";
|
|
3
|
+
import { BiffWriteError } from "../biff/write-errors.js";
|
|
4
4
|
import { writeRecord } from "../biff/record-writer.js";
|
|
5
5
|
import { writeXLUnicodeString, writeXLUnicodeStringNoCch } from "../biff/string-writer.js";
|
|
6
6
|
//#region src/workbook/comment-writer.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RawConditionalFormat12, c as RawIconSetFormat, d as RawTimePeriod, f as RawTimePeriodFormat, h as readCondFmt12Group, i as RawColorScaleFormat, l as RawSimpleFilterFormat, m as readCfTextFilterRule, n as RawAboveAverageFormat, o as RawConditionalFormat12Common, p as RawTop10Format, r as RawCfColor, s as RawDataBarFormat, t as CondFmt12GroupResult, u as RawTextFilterFormat } from "../conditional-format-12-
|
|
1
|
+
import { a as RawConditionalFormat12, c as RawIconSetFormat, d as RawTimePeriod, f as RawTimePeriodFormat, h as readCondFmt12Group, i as RawColorScaleFormat, l as RawSimpleFilterFormat, m as readCfTextFilterRule, n as RawAboveAverageFormat, o as RawConditionalFormat12Common, p as RawTop10Format, r as RawCfColor, s as RawDataBarFormat, t as CondFmt12GroupResult, u as RawTextFilterFormat } from "../conditional-format-12-ZkrPfAP4.cjs";
|
|
2
2
|
export { CondFmt12GroupResult, RawAboveAverageFormat, RawCfColor, RawColorScaleFormat, RawConditionalFormat12, RawConditionalFormat12Common, RawDataBarFormat, RawIconSetFormat, RawSimpleFilterFormat, RawTextFilterFormat, RawTimePeriod, RawTimePeriodFormat, RawTop10Format, readCfTextFilterRule, readCondFmt12Group };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RawConditionalFormat12, c as RawIconSetFormat, d as RawTimePeriod, f as RawTimePeriodFormat, h as readCondFmt12Group, i as RawColorScaleFormat, l as RawSimpleFilterFormat, m as readCfTextFilterRule, n as RawAboveAverageFormat, o as RawConditionalFormat12Common, p as RawTop10Format, r as RawCfColor, s as RawDataBarFormat, t as CondFmt12GroupResult, u as RawTextFilterFormat } from "../conditional-format-12-
|
|
1
|
+
import { a as RawConditionalFormat12, c as RawIconSetFormat, d as RawTimePeriod, f as RawTimePeriodFormat, h as readCondFmt12Group, i as RawColorScaleFormat, l as RawSimpleFilterFormat, m as readCfTextFilterRule, n as RawAboveAverageFormat, o as RawConditionalFormat12Common, p as RawTop10Format, r as RawCfColor, s as RawDataBarFormat, t as CondFmt12GroupResult, u as RawTextFilterFormat } from "../conditional-format-12-BTN59oHJ.js";
|
|
2
2
|
export { CondFmt12GroupResult, RawAboveAverageFormat, RawCfColor, RawColorScaleFormat, RawConditionalFormat12, RawConditionalFormat12Common, RawDataBarFormat, RawIconSetFormat, RawSimpleFilterFormat, RawTextFilterFormat, RawTimePeriod, RawTimePeriodFormat, RawTop10Format, readCfTextFilterRule, readCondFmt12Group };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.cjs";
|
|
2
1
|
import { t as RecordGroup } from "../substreams-XDNgDvRJ.cjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.cjs";
|
|
3
|
+
import { n as RawCfOperand } from "../conditional-format-BzTJe8Fm.cjs";
|
|
4
|
+
import { a as RawConditionalFormat12 } from "../conditional-format-12-ZkrPfAP4.cjs";
|
|
5
5
|
import { ContentSheetRange } from "document-schema.js";
|
|
6
6
|
//#region src/workbook/conditional-format-ex.d.ts
|
|
7
7
|
interface CfExTarget {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.js";
|
|
2
1
|
import { t as RecordGroup } from "../substreams-CgTHx5kX.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { r as FormulaSheetContext } from "../ptg-75v7MhaA.js";
|
|
3
|
+
import { n as RawCfOperand } from "../conditional-format-D4U0eLcY.js";
|
|
4
|
+
import { a as RawConditionalFormat12 } from "../conditional-format-12-BTN59oHJ.js";
|
|
5
5
|
import { ContentSheetRange } from "document-schema.js";
|
|
6
6
|
//#region src/workbook/conditional-format-ex.d.ts
|
|
7
7
|
interface CfExTarget {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../biff/record-types.cjs");
|
|
3
|
-
const require_biff_write_errors = require("../biff/write-errors.cjs");
|
|
4
3
|
const require_biff_builder = require("../biff/builder.cjs");
|
|
4
|
+
const require_biff_write_errors = require("../biff/write-errors.cjs");
|
|
5
5
|
const require_biff_record_writer = require("../biff/record-writer.cjs");
|
|
6
6
|
const require_biff_ptg_writer = require("../biff/ptg-writer.cjs");
|
|
7
7
|
//#region src/workbook/conditional-format-write.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../biff/record-types.js";
|
|
2
|
-
import { BiffWriteError } from "../biff/write-errors.js";
|
|
3
2
|
import { RecordBuilder } from "../biff/builder.js";
|
|
3
|
+
import { BiffWriteError } from "../biff/write-errors.js";
|
|
4
4
|
import { writeRecord } from "../biff/record-writer.js";
|
|
5
5
|
import { compileFormulaText } from "../biff/ptg-writer.js";
|
|
6
6
|
//#region src/workbook/conditional-format-write.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../biff/record-types.cjs");
|
|
3
3
|
const require_biff_records = require("../biff/records.cjs");
|
|
4
|
-
const require_biff_substreams = require("../biff/substreams.cjs");
|
|
5
4
|
const require_biff_cursor = require("../biff/cursor.cjs");
|
|
5
|
+
const require_biff_substreams = require("../biff/substreams.cjs");
|
|
6
6
|
const require_biff_ptg = require("../biff/ptg.cjs");
|
|
7
7
|
//#region src/workbook/conditional-format.ts
|
|
8
8
|
const CP_TO_OPERATOR = /* @__PURE__ */ new Map([
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RawConditionalFormatStyle, i as RawConditionalFormatFill, n as RawCfOperand, o as parseDxfStyle, r as RawConditionalFormat, s as readCondFmtGroup, t as CondFmtGroupResult } from "../conditional-format-
|
|
1
|
+
import { a as RawConditionalFormatStyle, i as RawConditionalFormatFill, n as RawCfOperand, o as parseDxfStyle, r as RawConditionalFormat, s as readCondFmtGroup, t as CondFmtGroupResult } from "../conditional-format-BzTJe8Fm.cjs";
|
|
2
2
|
export { CondFmtGroupResult, RawCfOperand, RawConditionalFormat, RawConditionalFormatFill, RawConditionalFormatStyle, parseDxfStyle, readCondFmtGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RawConditionalFormatStyle, i as RawConditionalFormatFill, n as RawCfOperand, o as parseDxfStyle, r as RawConditionalFormat, s as readCondFmtGroup, t as CondFmtGroupResult } from "../conditional-format-
|
|
1
|
+
import { a as RawConditionalFormatStyle, i as RawConditionalFormatFill, n as RawCfOperand, o as parseDxfStyle, r as RawConditionalFormat, s as readCondFmtGroup, t as CondFmtGroupResult } from "../conditional-format-D4U0eLcY.js";
|
|
2
2
|
export { CondFmtGroupResult, RawCfOperand, RawConditionalFormat, RawConditionalFormatFill, RawConditionalFormatStyle, parseDxfStyle, readCondFmtGroup };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../biff/record-types.js";
|
|
2
2
|
import { BiffFormatError } from "../biff/records.js";
|
|
3
|
-
import { recordByteLength } from "../biff/substreams.js";
|
|
4
3
|
import { BlockCursor } from "../biff/cursor.js";
|
|
4
|
+
import { recordByteLength } from "../biff/substreams.js";
|
|
5
5
|
import { parseFormulaText } from "../biff/ptg.js";
|
|
6
6
|
//#region src/workbook/conditional-format.ts
|
|
7
7
|
const CP_TO_OPERATOR = /* @__PURE__ */ new Map([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../biff/record-types.cjs");
|
|
3
|
-
const require_biff_write_errors = require("../biff/write-errors.cjs");
|
|
4
3
|
const require_biff_builder = require("../biff/builder.cjs");
|
|
4
|
+
const require_biff_write_errors = require("../biff/write-errors.cjs");
|
|
5
5
|
const require_biff_record_writer = require("../biff/record-writer.cjs");
|
|
6
6
|
const require_biff_string_writer = require("../biff/string-writer.cjs");
|
|
7
7
|
const require_biff_ptg_writer = require("../biff/ptg-writer.cjs");
|