xls-codec 4.5.0 → 4.7.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 +4 -3
- package/dist/biff/record-types.cjs +15 -0
- package/dist/biff/record-types.d.cts +11 -1
- package/dist/biff/record-types.d.ts +11 -1
- package/dist/biff/record-types.js +11 -1
- package/dist/biff/records.cjs +4 -3
- package/dist/biff/records.d.cts +2 -2
- package/dist/biff/records.d.ts +2 -2
- package/dist/biff/records.js +4 -4
- package/dist/biff/substreams.d.cts +1 -1
- package/dist/biff/substreams.d.ts +1 -1
- package/dist/{conditional-format-12-Dw82ECRh.d.ts → conditional-format-12-D-X5g_O3.d.ts} +31 -4
- package/dist/{conditional-format-12-DdEL5DL0.d.cts → conditional-format-12-DBhe7Zo6.d.cts} +31 -4
- package/dist/{conditional-format-DUQuOrNW.d.cts → conditional-format-Czh2oTzQ.d.cts} +3 -2
- package/dist/{conditional-format-BV2313jL.d.ts → conditional-format-DOdazxWe.d.ts} +3 -2
- package/dist/content.cjs +57 -11
- package/dist/content.d.cts +3 -3
- package/dist/content.d.ts +3 -3
- package/dist/content.js +57 -11
- package/dist/{data-validation-DsVG0Mms.d.ts → data-validation-BXvIVU0e.d.ts} +1 -1
- package/dist/{data-validation-DZPzAW-8.d.cts → data-validation-DfpjUN-N.d.cts} +1 -1
- package/dist/index.cjs +6 -0
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/{print-names-DyYloloV.d.cts → print-names-CCwUHAoL.d.cts} +1 -1
- package/dist/{print-names-C-PQ2vAy.d.ts → print-names-CxAbgcjB.d.ts} +1 -1
- package/dist/{records-DVIqXFKk.d.cts → records-G82UEVq8.d.cts} +3 -1
- package/dist/{records-DVIqXFKk.d.ts → records-G82UEVq8.d.ts} +3 -1
- package/dist/{substreams-Cpy5Fi3d.d.cts → substreams-CHv3oWmn.d.cts} +1 -1
- package/dist/{substreams-CmyZMtuM.d.ts → substreams-Dp5cZoUo.d.ts} +1 -1
- package/dist/workbook/comments.d.cts +1 -1
- package/dist/workbook/comments.d.ts +1 -1
- package/dist/workbook/conditional-format-12.cjs +79 -3
- package/dist/workbook/conditional-format-12.d.cts +2 -2
- package/dist/workbook/conditional-format-12.d.ts +2 -2
- package/dist/workbook/conditional-format-12.js +79 -3
- package/dist/workbook/conditional-format.cjs +1 -0
- package/dist/workbook/conditional-format.d.cts +2 -2
- package/dist/workbook/conditional-format.d.ts +2 -2
- package/dist/workbook/conditional-format.js +1 -1
- package/dist/workbook/data-validation.d.cts +1 -1
- package/dist/workbook/data-validation.d.ts +1 -1
- package/dist/workbook/encryption.cjs +78 -0
- package/dist/workbook/encryption.d.cts +10 -0
- package/dist/workbook/encryption.d.ts +10 -0
- package/dist/workbook/encryption.js +77 -0
- package/dist/workbook/globals-writer.d.cts +1 -1
- package/dist/workbook/globals-writer.d.ts +1 -1
- package/dist/workbook/globals.d.cts +2 -2
- package/dist/workbook/globals.d.ts +2 -2
- package/dist/workbook/print-names.d.cts +1 -1
- package/dist/workbook/print-names.d.ts +1 -1
- package/dist/workbook/sheet.d.cts +4 -4
- package/dist/workbook/sheet.d.ts +4 -4
- package/package.json +2 -2
package/dist/content.js
CHANGED
|
@@ -9,6 +9,7 @@ import { readSheetComments } from "./workbook/comments.js";
|
|
|
9
9
|
import { serialToIsoDate, serialToIsoDateTime, serialToIsoTime } from "./serial.js";
|
|
10
10
|
import { formatCodeOf, readWorkbookGlobals } from "./workbook/globals.js";
|
|
11
11
|
import { readSheetRecords } from "./workbook/sheet.js";
|
|
12
|
+
import { decryptWorkbookRecords } from "./workbook/encryption.js";
|
|
12
13
|
import { readSummaryInformation, summaryInformationToLayoutMetadata } from "archive-codec";
|
|
13
14
|
import { PAGE_SIZE_LETTER, assembleTree } from "document-schema.js";
|
|
14
15
|
import { classifyNumberFormat } from "excel-number-format";
|
|
@@ -78,14 +79,16 @@ function mapPrintSettings(raw, names) {
|
|
|
78
79
|
/**
|
|
79
80
|
* Reads a .xls file's bytes into a ContentDocument.
|
|
80
81
|
*
|
|
81
|
-
* The counterpart of ooxml.js's readXlsxContent, producing the same shape from the older format.
|
|
82
|
+
* The counterpart of ooxml.js's readXlsxContent, producing the same shape from the older format. `password` decrypts a workbook protected by [MS-XLS] 2.4.117's FilePass record under the [MS-OFFCRYPTO] 2.3.6.1 RC4 encryption header scheme -- see workbook/encryption.ts. It is ignored for an unencrypted workbook, and a missing or incorrect password against an encrypted one throws rather than returning a partial or garbled document.
|
|
82
83
|
*/
|
|
83
|
-
function readXlsContent(bytes) {
|
|
84
|
+
function readXlsContent(bytes, password) {
|
|
84
85
|
const { workbook, metadata } = readWorkbookStreams(bytes);
|
|
85
|
-
const
|
|
86
|
+
const rawRecords = readRecords(workbook);
|
|
87
|
+
const filePassRecord = rawRecords.find((record) => record.type === 47);
|
|
88
|
+
const records = filePassRecord === void 0 ? rawRecords : decryptWorkbookRecords(rawRecords, filePassRecord, password);
|
|
89
|
+
const substreams = splitSubstreams(groupRecords(records));
|
|
86
90
|
const globalsSubstream = substreams[0];
|
|
87
91
|
if (globalsSubstream === void 0) throw new BiffFormatError("workbook stream holds no substreams, so it carries no globals substream");
|
|
88
|
-
if (globalsSubstream.records.some((rec) => rec.type === 47)) throw new BiffFormatError("workbook is encrypted (its globals substream carries a FilePass record); this reader does not decrypt");
|
|
89
92
|
const globals = readWorkbookGlobals(globalsSubstream.records);
|
|
90
93
|
const sheets = globals.sheets.map((entry, sheetIndex) => ({
|
|
91
94
|
entry,
|
|
@@ -98,8 +101,8 @@ function readXlsContent(bytes) {
|
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
/** The tree-form read: readXlsContent composed with the schema's own structural transform, exactly as ooxml.js's readXlsx wraps readXlsxContent. */
|
|
101
|
-
function readXls(bytes) {
|
|
102
|
-
return assembleTree(readXlsContent(bytes));
|
|
104
|
+
function readXls(bytes, password) {
|
|
105
|
+
return assembleTree(readXlsContent(bytes, password));
|
|
103
106
|
}
|
|
104
107
|
/**
|
|
105
108
|
* Locates a sheet's own substream and maps it.
|
|
@@ -185,12 +188,55 @@ function mapConditionalFormats12(raw, palette) {
|
|
|
185
188
|
});
|
|
186
189
|
continue;
|
|
187
190
|
}
|
|
191
|
+
if (format.kind === "iconSet") {
|
|
192
|
+
results.push({
|
|
193
|
+
type: "iconSet",
|
|
194
|
+
iconSetType: format.iconSetType,
|
|
195
|
+
thresholds: [...format.thresholds],
|
|
196
|
+
...format.reverse ? { reverse: true } : {},
|
|
197
|
+
...format.showValue ? {} : { showValue: false },
|
|
198
|
+
...common
|
|
199
|
+
});
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (format.kind === "top10") {
|
|
203
|
+
const style = mapConditionalFormatStyle(format.style, palette);
|
|
204
|
+
results.push({
|
|
205
|
+
type: "top10",
|
|
206
|
+
rank: format.rank,
|
|
207
|
+
...format.percent ? { percent: true } : {},
|
|
208
|
+
...format.bottom ? { bottom: true } : {},
|
|
209
|
+
...style !== void 0 ? { style } : {},
|
|
210
|
+
...common
|
|
211
|
+
});
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
if (format.kind === "aboveAverage") {
|
|
215
|
+
const style = mapConditionalFormatStyle(format.style, palette);
|
|
216
|
+
results.push({
|
|
217
|
+
type: "aboveAverage",
|
|
218
|
+
...format.aboveAverage ? {} : { aboveAverage: false },
|
|
219
|
+
...format.equalAverage ? { equalAverage: true } : {},
|
|
220
|
+
...format.stdDev !== void 0 ? { stdDev: format.stdDev } : {},
|
|
221
|
+
...style !== void 0 ? { style } : {},
|
|
222
|
+
...common
|
|
223
|
+
});
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
if (format.kind === "timePeriod") {
|
|
227
|
+
const style = mapConditionalFormatStyle(format.style, palette);
|
|
228
|
+
results.push({
|
|
229
|
+
type: "timePeriod",
|
|
230
|
+
timePeriod: format.timePeriod,
|
|
231
|
+
...style !== void 0 ? { style } : {},
|
|
232
|
+
...common
|
|
233
|
+
});
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
const style = mapConditionalFormatStyle(format.style, palette);
|
|
188
237
|
results.push({
|
|
189
|
-
type:
|
|
190
|
-
|
|
191
|
-
thresholds: [...format.thresholds],
|
|
192
|
-
...format.reverse ? { reverse: true } : {},
|
|
193
|
-
...format.showValue ? {} : { showValue: false },
|
|
238
|
+
type: format.kind,
|
|
239
|
+
...style !== void 0 ? { style } : {},
|
|
194
240
|
...common
|
|
195
241
|
});
|
|
196
242
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as FormulaSheetContext } from "./ptg-CCBbJLZJ.js";
|
|
2
|
-
import { t as RecordGroup } from "./substreams-
|
|
2
|
+
import { t as RecordGroup } from "./substreams-Dp5cZoUo.js";
|
|
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
1
|
import { r as FormulaSheetContext } from "./ptg-CCBbJLZJ.cjs";
|
|
2
|
-
import { t as RecordGroup } from "./substreams-
|
|
2
|
+
import { t as RecordGroup } from "./substreams-CHv3oWmn.cjs";
|
|
3
3
|
import { ContentSheetRange, SheetRuleOperator } from "document-schema.js";
|
|
4
4
|
//#region src/workbook/data-validation.d.ts
|
|
5
5
|
interface RawDataValidation {
|
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ exports.BiffFormatError = require_biff_records.BiffFormatError;
|
|
|
31
31
|
exports.BiffWriteError = require_biff_write_errors.BiffWriteError;
|
|
32
32
|
exports.BlockCursor = require_biff_cursor.BlockCursor;
|
|
33
33
|
exports.GENERAL_CELL_XF_INDEX = require_workbook_globals_writer.GENERAL_CELL_XF_INDEX;
|
|
34
|
+
exports.HEADER_SIZE = require_biff_records.HEADER_SIZE;
|
|
34
35
|
exports.MAX_RECORD_DATA_SIZE = require_biff_record_types.MAX_RECORD_DATA_SIZE;
|
|
35
36
|
exports.RECORD_ARRAY = require_biff_record_types.RECORD_ARRAY;
|
|
36
37
|
exports.RECORD_BLANK = require_biff_record_types.RECORD_BLANK;
|
|
@@ -58,11 +59,13 @@ exports.RECORD_DV = require_biff_record_types.RECORD_DV;
|
|
|
58
59
|
exports.RECORD_DVAL = require_biff_record_types.RECORD_DVAL;
|
|
59
60
|
exports.RECORD_EOF = require_biff_record_types.RECORD_EOF;
|
|
60
61
|
exports.RECORD_EXTERNSHEET = require_biff_record_types.RECORD_EXTERNSHEET;
|
|
62
|
+
exports.RECORD_FILELOCK = require_biff_record_types.RECORD_FILELOCK;
|
|
61
63
|
exports.RECORD_FILEPASS = require_biff_record_types.RECORD_FILEPASS;
|
|
62
64
|
exports.RECORD_FONT = require_biff_record_types.RECORD_FONT;
|
|
63
65
|
exports.RECORD_FORMAT = require_biff_record_types.RECORD_FORMAT;
|
|
64
66
|
exports.RECORD_FORMULA = require_biff_record_types.RECORD_FORMULA;
|
|
65
67
|
exports.RECORD_HORIZONTALPAGEBREAKS = require_biff_record_types.RECORD_HORIZONTALPAGEBREAKS;
|
|
68
|
+
exports.RECORD_INTERFACEHDR = require_biff_record_types.RECORD_INTERFACEHDR;
|
|
66
69
|
exports.RECORD_LABEL = require_biff_record_types.RECORD_LABEL;
|
|
67
70
|
exports.RECORD_LABELSST = require_biff_record_types.RECORD_LABELSST;
|
|
68
71
|
exports.RECORD_LBL = require_biff_record_types.RECORD_LBL;
|
|
@@ -79,6 +82,8 @@ exports.RECORD_PRINTROWCOL = require_biff_record_types.RECORD_PRINTROWCOL;
|
|
|
79
82
|
exports.RECORD_RIGHTMARGIN = require_biff_record_types.RECORD_RIGHTMARGIN;
|
|
80
83
|
exports.RECORD_RK = require_biff_record_types.RECORD_RK;
|
|
81
84
|
exports.RECORD_ROW = require_biff_record_types.RECORD_ROW;
|
|
85
|
+
exports.RECORD_RRDHEAD = require_biff_record_types.RECORD_RRDHEAD;
|
|
86
|
+
exports.RECORD_RRDINFO = require_biff_record_types.RECORD_RRDINFO;
|
|
82
87
|
exports.RECORD_SETUP = require_biff_record_types.RECORD_SETUP;
|
|
83
88
|
exports.RECORD_SHRFMLA = require_biff_record_types.RECORD_SHRFMLA;
|
|
84
89
|
exports.RECORD_SST = require_biff_record_types.RECORD_SST;
|
|
@@ -88,6 +93,7 @@ exports.RECORD_SUPBOOK = require_biff_record_types.RECORD_SUPBOOK;
|
|
|
88
93
|
exports.RECORD_TABLE = require_biff_record_types.RECORD_TABLE;
|
|
89
94
|
exports.RECORD_TOPMARGIN = require_biff_record_types.RECORD_TOPMARGIN;
|
|
90
95
|
exports.RECORD_TXO = require_biff_record_types.RECORD_TXO;
|
|
96
|
+
exports.RECORD_USREXCL = require_biff_record_types.RECORD_USREXCL;
|
|
91
97
|
exports.RECORD_VERTICALPAGEBREAKS = require_biff_record_types.RECORD_VERTICALPAGEBREAKS;
|
|
92
98
|
exports.RECORD_WSBOOL = require_biff_record_types.RECORD_WSBOOL;
|
|
93
99
|
exports.RECORD_XF = require_biff_record_types.RECORD_XF;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,13 +2,13 @@ import { writeBofData } from "./biff/bof-writer.cjs";
|
|
|
2
2
|
import { RecordBuilder } from "./biff/builder.cjs";
|
|
3
3
|
import { t as BlockCursor } from "./cursor-VMtw9uVP.cjs";
|
|
4
4
|
import { errorCodeOf, errorTextOf } from "./biff/errors.cjs";
|
|
5
|
-
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, 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_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_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF } from "./biff/record-types.cjs";
|
|
5
|
+
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, 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_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_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_SETUP, RECORD_SHRFMLA, 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
6
|
import { concatRecords, writeRecord } from "./biff/record-writer.cjs";
|
|
7
|
-
import { n as BiffRecord, r as
|
|
7
|
+
import { i as readRecords, n as BiffRecord, r as HEADER_SIZE, t as BiffFormatError } from "./records-G82UEVq8.cjs";
|
|
8
8
|
import { decodeRkNumber } from "./biff/rk.cjs";
|
|
9
9
|
import { writeRichExtendedString, writeShortXLUnicodeString, writeXLUnicodeString } from "./biff/string-writer.cjs";
|
|
10
10
|
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-
|
|
11
|
+
import { a as splitSubstreams, i as recordByteLength, n as Substream, r as groupRecords, t as RecordGroup } from "./substreams-CHv3oWmn.cjs";
|
|
12
12
|
import { BiffWriteError } from "./biff/write-errors.cjs";
|
|
13
13
|
import { writeCellXfRecord, writeFontRecord, writeFormatRecord, writePaletteRecord, writeStyleRecord, writeStyleXfRecord } from "./biff/xf-writer.cjs";
|
|
14
14
|
import { SUMMARY_INFORMATION_STREAM, WorkbookStreams, isXlsFile, readWorkbookStreams } from "./container.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, GENERAL_CELL_XF_INDEX, MAX_RECORD_DATA_SIZE, 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_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_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, 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, writeFontRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXls, writeXlsContent };
|
|
25
|
+
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffRecord, BiffWriteError, BlockCursor, CellFormat, CellXfPlanEntry, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, 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_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_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_SETUP, RECORD_SHRFMLA, 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, writeFontRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXls, writeXlsContent };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { writeBofData } from "./biff/bof-writer.js";
|
|
|
2
2
|
import { RecordBuilder } from "./biff/builder.js";
|
|
3
3
|
import { t as BlockCursor } from "./cursor-VMtw9uVP.js";
|
|
4
4
|
import { errorCodeOf, errorTextOf } from "./biff/errors.js";
|
|
5
|
-
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, 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_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_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF } from "./biff/record-types.js";
|
|
5
|
+
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, 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_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_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_SETUP, RECORD_SHRFMLA, 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
6
|
import { concatRecords, writeRecord } from "./biff/record-writer.js";
|
|
7
|
-
import { n as BiffRecord, r as
|
|
7
|
+
import { i as readRecords, n as BiffRecord, r as HEADER_SIZE, t as BiffFormatError } from "./records-G82UEVq8.js";
|
|
8
8
|
import { decodeRkNumber } from "./biff/rk.js";
|
|
9
9
|
import { writeRichExtendedString, writeShortXLUnicodeString, writeXLUnicodeString } from "./biff/string-writer.js";
|
|
10
10
|
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-
|
|
11
|
+
import { a as splitSubstreams, i as recordByteLength, n as Substream, r as groupRecords, t as RecordGroup } from "./substreams-Dp5cZoUo.js";
|
|
12
12
|
import { BiffWriteError } from "./biff/write-errors.js";
|
|
13
13
|
import { writeCellXfRecord, writeFontRecord, writeFormatRecord, writePaletteRecord, writeStyleRecord, writeStyleXfRecord } from "./biff/xf-writer.js";
|
|
14
14
|
import { SUMMARY_INFORMATION_STREAM, WorkbookStreams, isXlsFile, readWorkbookStreams } from "./container.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, GENERAL_CELL_XF_INDEX, MAX_RECORD_DATA_SIZE, 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_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_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, 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, writeFontRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXls, writeXlsContent };
|
|
25
|
+
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffRecord, BiffWriteError, BlockCursor, CellFormat, CellXfPlanEntry, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, 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_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_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_SETUP, RECORD_SHRFMLA, 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, writeFontRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXls, writeXlsContent };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, 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_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_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, RECORD_VERTICALPAGEBREAKS, RECORD_WSBOOL, RECORD_XF } from "./biff/record-types.js";
|
|
2
|
-
import { BiffFormatError, readRecords } from "./biff/records.js";
|
|
1
|
+
import { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, MAX_RECORD_DATA_SIZE, 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_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_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_SETUP, RECORD_SHRFMLA, 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";
|
|
2
|
+
import { BiffFormatError, HEADER_SIZE, readRecords } from "./biff/records.js";
|
|
3
3
|
import { SUMMARY_INFORMATION_STREAM, isXlsFile, readWorkbookStreams } from "./container.js";
|
|
4
4
|
import { columnWidthToPoints, inchesToPoints, millimetresToPoints, pointsToColumnWidth, pointsToInches, pointsToTwips, twipsToPoints } from "./units.js";
|
|
5
5
|
import { groupRecords, recordByteLength, splitSubstreams } from "./biff/substreams.js";
|
|
@@ -22,4 +22,4 @@ import { GENERAL_CELL_XF_INDEX, buildWorkbookGlobals } from "./workbook/globals-
|
|
|
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, GENERAL_CELL_XF_INDEX, MAX_RECORD_DATA_SIZE, 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_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_FILEPASS, RECORD_FONT, RECORD_FORMAT, RECORD_FORMULA, RECORD_HORIZONTALPAGEBREAKS, RECORD_LABEL, RECORD_LABELSST, RECORD_LBL, RECORD_LEFTMARGIN, RECORD_MERGECELLS, RECORD_MULBLANK, RECORD_MULRK, RECORD_NOTE, RECORD_NUMBER, RECORD_OBJ, RECORD_PALETTE, RECORD_PRINTGRID, RECORD_PRINTROWCOL, RECORD_RIGHTMARGIN, RECORD_RK, RECORD_ROW, RECORD_SETUP, RECORD_SHRFMLA, RECORD_SST, RECORD_STRING, RECORD_STYLE, RECORD_SUPBOOK, RECORD_TABLE, RECORD_TOPMARGIN, RECORD_TXO, 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, writeFontRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXls, writeXlsContent };
|
|
25
|
+
export { BIFF8_VERSION, BOF_TYPE_CHART, BOF_TYPE_MACRO, BOF_TYPE_WORKBOOK, BOF_TYPE_WORKSHEET, BiffFormatError, BiffWriteError, BlockCursor, GENERAL_CELL_XF_INDEX, HEADER_SIZE, MAX_RECORD_DATA_SIZE, 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_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_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_SETUP, RECORD_SHRFMLA, 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, writeFontRecord, writeFormatRecord, writePaletteRecord, writeRecord, writeRichExtendedString, writeShortXLUnicodeString, writeStyleRecord, writeStyleXfRecord, writeXLUnicodeString, writeXls, writeXlsContent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RecordGroup } from "./substreams-
|
|
1
|
+
import { t as RecordGroup } from "./substreams-CHv3oWmn.cjs";
|
|
2
2
|
import { ContentSheetPrintRange, ContentSheetRepeatRange } from "document-schema.js";
|
|
3
3
|
//#region src/workbook/print-names.d.ts
|
|
4
4
|
/** One sheet's print names, as the Lbl records of the globals substream carry them. Every field is absent when the workbook declares no such name for that sheet. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RecordGroup } from "./substreams-
|
|
1
|
+
import { t as RecordGroup } from "./substreams-Dp5cZoUo.js";
|
|
2
2
|
import { ContentSheetPrintRange, ContentSheetRepeatRange } from "document-schema.js";
|
|
3
3
|
//#region src/workbook/print-names.d.ts
|
|
4
4
|
/** One sheet's print names, as the Lbl records of the globals substream carry them. Every field is absent when the workbook declares no such name for that sheet. */
|
|
@@ -10,6 +10,8 @@ interface BiffRecord {
|
|
|
10
10
|
declare class BiffFormatError extends Error {
|
|
11
11
|
constructor(message: string);
|
|
12
12
|
}
|
|
13
|
+
/** The four-byte record header: a two-byte type followed by a two-byte size. Exported for workbook/encryption.ts, which needs a record's own data start offset (the byte position right after this header) to derive the correct RC4 keystream position -- [MS-XLS] 2.2.10 counts a record's own header bytes toward the encryption stream's position even though the header itself is never encrypted. */
|
|
14
|
+
declare const HEADER_SIZE = 4;
|
|
13
15
|
/**
|
|
14
16
|
* Splits a BIFF record stream into its records, in stream order.
|
|
15
17
|
*
|
|
@@ -17,4 +19,4 @@ declare class BiffFormatError extends Error {
|
|
|
17
19
|
*/
|
|
18
20
|
declare function readRecords(stream: Uint8Array<ArrayBuffer>): readonly BiffRecord[];
|
|
19
21
|
//#endregion
|
|
20
|
-
export { BiffRecord as n,
|
|
22
|
+
export { readRecords as i, BiffRecord as n, HEADER_SIZE as r, BiffFormatError as t };
|
|
@@ -10,6 +10,8 @@ interface BiffRecord {
|
|
|
10
10
|
declare class BiffFormatError extends Error {
|
|
11
11
|
constructor(message: string);
|
|
12
12
|
}
|
|
13
|
+
/** The four-byte record header: a two-byte type followed by a two-byte size. Exported for workbook/encryption.ts, which needs a record's own data start offset (the byte position right after this header) to derive the correct RC4 keystream position -- [MS-XLS] 2.2.10 counts a record's own header bytes toward the encryption stream's position even though the header itself is never encrypted. */
|
|
14
|
+
declare const HEADER_SIZE = 4;
|
|
13
15
|
/**
|
|
14
16
|
* Splits a BIFF record stream into its records, in stream order.
|
|
15
17
|
*
|
|
@@ -17,4 +19,4 @@ declare class BiffFormatError extends Error {
|
|
|
17
19
|
*/
|
|
18
20
|
declare function readRecords(stream: Uint8Array<ArrayBuffer>): readonly BiffRecord[];
|
|
19
21
|
//#endregion
|
|
20
|
-
export { BiffRecord as n,
|
|
22
|
+
export { readRecords as i, BiffRecord as n, HEADER_SIZE as r, BiffFormatError as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BiffRecord } from "./records-
|
|
1
|
+
import { n as BiffRecord } from "./records-G82UEVq8.cjs";
|
|
2
2
|
//#region src/biff/substreams.d.ts
|
|
3
3
|
/** One logical record: its type, its data blocks -- the base record's, then one per Continue that followed it -- and the base record's own offset in the stream. */
|
|
4
4
|
interface RecordGroup {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BiffRecord } from "./records-
|
|
1
|
+
import { n as BiffRecord } from "./records-G82UEVq8.js";
|
|
2
2
|
//#region src/biff/substreams.d.ts
|
|
3
3
|
/** One logical record: its type, its data blocks -- the base record's, then one per Continue that followed it -- and the base record's own offset in the stream. */
|
|
4
4
|
interface RecordGroup {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RecordGroup } from "../substreams-
|
|
1
|
+
import { t as RecordGroup } from "../substreams-CHv3oWmn.cjs";
|
|
2
2
|
import { ContentSheetCellComment } from "document-schema.js";
|
|
3
3
|
//#region src/workbook/comments.d.ts
|
|
4
4
|
/** One comment, resolved to the cell position it is anchored to. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RecordGroup } from "../substreams-
|
|
1
|
+
import { t as RecordGroup } from "../substreams-Dp5cZoUo.js";
|
|
2
2
|
import { ContentSheetCellComment } from "document-schema.js";
|
|
3
3
|
//#region src/workbook/comments.d.ts
|
|
4
4
|
/** One comment, resolved to the cell position it is anchored to. */
|
|
@@ -3,6 +3,7 @@ require("../biff/record-types.cjs");
|
|
|
3
3
|
const require_biff_records = require("../biff/records.cjs");
|
|
4
4
|
const require_biff_cursor = require("../biff/cursor.cjs");
|
|
5
5
|
const require_biff_ptg = require("../biff/ptg.cjs");
|
|
6
|
+
const require_workbook_conditional_format = require("./conditional-format.cjs");
|
|
6
7
|
//#region src/workbook/conditional-format-12.ts
|
|
7
8
|
const CFVO_TYPE_TO_VALUE_TYPE = /* @__PURE__ */ new Map([
|
|
8
9
|
[1, "num"],
|
|
@@ -149,6 +150,69 @@ function readCfMultistate(cursor, formulaSheets) {
|
|
|
149
150
|
showValue
|
|
150
151
|
};
|
|
151
152
|
}
|
|
153
|
+
const ICF_TEMPLATE_TOP10 = 5;
|
|
154
|
+
const ICF_TEMPLATE_UNIQUE_VALUES = 7;
|
|
155
|
+
const ICF_TEMPLATE_CONTAINS_BLANKS = 9;
|
|
156
|
+
const ICF_TEMPLATE_CONTAINS_NO_BLANKS = 10;
|
|
157
|
+
const ICF_TEMPLATE_CONTAINS_ERRORS = 11;
|
|
158
|
+
const ICF_TEMPLATE_CONTAINS_NO_ERRORS = 12;
|
|
159
|
+
const ICF_TEMPLATE_ABOVE_AVERAGE = 25;
|
|
160
|
+
const ICF_TEMPLATE_BELOW_AVERAGE = 26;
|
|
161
|
+
const ICF_TEMPLATE_DUPLICATE_VALUES = 27;
|
|
162
|
+
const ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE = 29;
|
|
163
|
+
const ICF_TEMPLATE_BELOW_OR_EQUAL_AVERAGE = 30;
|
|
164
|
+
const ICF_TEMPLATE_TO_TIME_PERIOD = /* @__PURE__ */ new Map([
|
|
165
|
+
[15, "today"],
|
|
166
|
+
[16, "tomorrow"],
|
|
167
|
+
[17, "yesterday"],
|
|
168
|
+
[18, "last7Days"],
|
|
169
|
+
[19, "lastMonth"],
|
|
170
|
+
[20, "nextMonth"],
|
|
171
|
+
[21, "thisWeek"],
|
|
172
|
+
[22, "nextWeek"],
|
|
173
|
+
[23, "lastWeek"],
|
|
174
|
+
[24, "thisMonth"]
|
|
175
|
+
]);
|
|
176
|
+
const SIMPLE_ICF_TEMPLATE_KIND = /* @__PURE__ */ new Map([
|
|
177
|
+
[ICF_TEMPLATE_UNIQUE_VALUES, "uniqueValues"],
|
|
178
|
+
[ICF_TEMPLATE_CONTAINS_BLANKS, "containsBlanks"],
|
|
179
|
+
[ICF_TEMPLATE_CONTAINS_NO_BLANKS, "notContainsBlanks"],
|
|
180
|
+
[ICF_TEMPLATE_CONTAINS_ERRORS, "containsErrors"],
|
|
181
|
+
[ICF_TEMPLATE_CONTAINS_NO_ERRORS, "notContainsErrors"],
|
|
182
|
+
[ICF_TEMPLATE_DUPLICATE_VALUES, "duplicateValues"]
|
|
183
|
+
]);
|
|
184
|
+
function readCfFilterRule(icfTemplate, templateParams) {
|
|
185
|
+
if (icfTemplate === ICF_TEMPLATE_TOP10) {
|
|
186
|
+
const cursor = new require_biff_cursor.BlockCursor([templateParams]);
|
|
187
|
+
const flags = cursor.u8();
|
|
188
|
+
const top = (flags & 1) !== 0;
|
|
189
|
+
const percent = (flags >>> 1 & 1) !== 0;
|
|
190
|
+
const rank = cursor.u16();
|
|
191
|
+
if (rank <= 0) return;
|
|
192
|
+
return {
|
|
193
|
+
kind: "top10",
|
|
194
|
+
rank,
|
|
195
|
+
percent,
|
|
196
|
+
bottom: !top
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
if (icfTemplate === ICF_TEMPLATE_ABOVE_AVERAGE || icfTemplate === ICF_TEMPLATE_BELOW_AVERAGE || icfTemplate === ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE || icfTemplate === ICF_TEMPLATE_BELOW_OR_EQUAL_AVERAGE) {
|
|
200
|
+
const iParam = new require_biff_cursor.BlockCursor([templateParams]).u16();
|
|
201
|
+
return {
|
|
202
|
+
kind: "aboveAverage",
|
|
203
|
+
aboveAverage: icfTemplate === ICF_TEMPLATE_ABOVE_AVERAGE || icfTemplate === ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE,
|
|
204
|
+
equalAverage: icfTemplate === ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE || icfTemplate === ICF_TEMPLATE_BELOW_OR_EQUAL_AVERAGE,
|
|
205
|
+
stdDev: iParam > 0 ? iParam : void 0
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const timePeriod = ICF_TEMPLATE_TO_TIME_PERIOD.get(icfTemplate);
|
|
209
|
+
if (timePeriod !== void 0) return {
|
|
210
|
+
kind: "timePeriod",
|
|
211
|
+
timePeriod
|
|
212
|
+
};
|
|
213
|
+
const simpleKind = SIMPLE_ICF_TEMPLATE_KIND.get(icfTemplate);
|
|
214
|
+
if (simpleKind !== void 0) return { kind: simpleKind };
|
|
215
|
+
}
|
|
152
216
|
function readCf12(record, ranges, formulaSheets) {
|
|
153
217
|
try {
|
|
154
218
|
const cursor = new require_biff_cursor.BlockCursor(record.blocks);
|
|
@@ -158,16 +222,16 @@ function readCf12(record, ranges, formulaSheets) {
|
|
|
158
222
|
const cce1 = cursor.u16();
|
|
159
223
|
const cce2 = cursor.u16();
|
|
160
224
|
const cbDxf = cursor.u32();
|
|
161
|
-
cursor.
|
|
225
|
+
const dxfBytes = cursor.take(cbDxf);
|
|
162
226
|
cursor.skip(cce1);
|
|
163
227
|
cursor.skip(cce2);
|
|
164
228
|
const cceActive = cursor.u16();
|
|
165
229
|
cursor.skip(cceActive);
|
|
166
230
|
const stopIfTrue = (cursor.u8() & 2) !== 0;
|
|
167
231
|
const priority = cursor.u16();
|
|
168
|
-
cursor.
|
|
232
|
+
const icfTemplate = cursor.u16();
|
|
169
233
|
cursor.skip(1);
|
|
170
|
-
cursor.
|
|
234
|
+
const templateParams = cursor.take(16);
|
|
171
235
|
const common = {
|
|
172
236
|
priority,
|
|
173
237
|
stopIfTrue,
|
|
@@ -197,6 +261,18 @@ function readCf12(record, ranges, formulaSheets) {
|
|
|
197
261
|
...common
|
|
198
262
|
};
|
|
199
263
|
}
|
|
264
|
+
if (ct === 5) {
|
|
265
|
+
const rule = readCfFilterRule(icfTemplate, templateParams);
|
|
266
|
+
const cbFilter = cursor.u16();
|
|
267
|
+
cursor.skip(cbFilter);
|
|
268
|
+
if (rule === void 0) return;
|
|
269
|
+
const style = require_workbook_conditional_format.parseDxfStyle(dxfBytes);
|
|
270
|
+
return {
|
|
271
|
+
...rule,
|
|
272
|
+
...common,
|
|
273
|
+
style
|
|
274
|
+
};
|
|
275
|
+
}
|
|
200
276
|
return;
|
|
201
277
|
} catch (err) {
|
|
202
278
|
if (!(err instanceof require_biff_records.BiffFormatError)) throw err;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { CondFmt12GroupResult, RawCfColor, RawColorScaleFormat, RawConditionalFormat12, RawDataBarFormat, RawIconSetFormat, readCondFmt12Group };
|
|
1
|
+
import { a as RawConditionalFormat12, c as RawSimpleFilterFormat, d as RawTop10Format, f as readCondFmt12Group, i as RawColorScaleFormat, l as RawTimePeriod, n as RawAboveAverageFormat, o as RawDataBarFormat, r as RawCfColor, s as RawIconSetFormat, t as CondFmt12GroupResult, u as RawTimePeriodFormat } from "../conditional-format-12-DBhe7Zo6.cjs";
|
|
2
|
+
export { CondFmt12GroupResult, RawAboveAverageFormat, RawCfColor, RawColorScaleFormat, RawConditionalFormat12, RawDataBarFormat, RawIconSetFormat, RawSimpleFilterFormat, RawTimePeriod, RawTimePeriodFormat, RawTop10Format, readCondFmt12Group };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { CondFmt12GroupResult, RawCfColor, RawColorScaleFormat, RawConditionalFormat12, RawDataBarFormat, RawIconSetFormat, readCondFmt12Group };
|
|
1
|
+
import { a as RawConditionalFormat12, c as RawSimpleFilterFormat, d as RawTop10Format, f as readCondFmt12Group, i as RawColorScaleFormat, l as RawTimePeriod, n as RawAboveAverageFormat, o as RawDataBarFormat, r as RawCfColor, s as RawIconSetFormat, t as CondFmt12GroupResult, u as RawTimePeriodFormat } from "../conditional-format-12-D-X5g_O3.js";
|
|
2
|
+
export { CondFmt12GroupResult, RawAboveAverageFormat, RawCfColor, RawColorScaleFormat, RawConditionalFormat12, RawDataBarFormat, RawIconSetFormat, RawSimpleFilterFormat, RawTimePeriod, RawTimePeriodFormat, RawTop10Format, readCondFmt12Group };
|
|
@@ -2,6 +2,7 @@ import "../biff/record-types.js";
|
|
|
2
2
|
import { BiffFormatError } from "../biff/records.js";
|
|
3
3
|
import { BlockCursor } from "../biff/cursor.js";
|
|
4
4
|
import { parseFormulaText } from "../biff/ptg.js";
|
|
5
|
+
import { parseDxfStyle } from "./conditional-format.js";
|
|
5
6
|
//#region src/workbook/conditional-format-12.ts
|
|
6
7
|
const CFVO_TYPE_TO_VALUE_TYPE = /* @__PURE__ */ new Map([
|
|
7
8
|
[1, "num"],
|
|
@@ -148,6 +149,69 @@ function readCfMultistate(cursor, formulaSheets) {
|
|
|
148
149
|
showValue
|
|
149
150
|
};
|
|
150
151
|
}
|
|
152
|
+
const ICF_TEMPLATE_TOP10 = 5;
|
|
153
|
+
const ICF_TEMPLATE_UNIQUE_VALUES = 7;
|
|
154
|
+
const ICF_TEMPLATE_CONTAINS_BLANKS = 9;
|
|
155
|
+
const ICF_TEMPLATE_CONTAINS_NO_BLANKS = 10;
|
|
156
|
+
const ICF_TEMPLATE_CONTAINS_ERRORS = 11;
|
|
157
|
+
const ICF_TEMPLATE_CONTAINS_NO_ERRORS = 12;
|
|
158
|
+
const ICF_TEMPLATE_ABOVE_AVERAGE = 25;
|
|
159
|
+
const ICF_TEMPLATE_BELOW_AVERAGE = 26;
|
|
160
|
+
const ICF_TEMPLATE_DUPLICATE_VALUES = 27;
|
|
161
|
+
const ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE = 29;
|
|
162
|
+
const ICF_TEMPLATE_BELOW_OR_EQUAL_AVERAGE = 30;
|
|
163
|
+
const ICF_TEMPLATE_TO_TIME_PERIOD = /* @__PURE__ */ new Map([
|
|
164
|
+
[15, "today"],
|
|
165
|
+
[16, "tomorrow"],
|
|
166
|
+
[17, "yesterday"],
|
|
167
|
+
[18, "last7Days"],
|
|
168
|
+
[19, "lastMonth"],
|
|
169
|
+
[20, "nextMonth"],
|
|
170
|
+
[21, "thisWeek"],
|
|
171
|
+
[22, "nextWeek"],
|
|
172
|
+
[23, "lastWeek"],
|
|
173
|
+
[24, "thisMonth"]
|
|
174
|
+
]);
|
|
175
|
+
const SIMPLE_ICF_TEMPLATE_KIND = /* @__PURE__ */ new Map([
|
|
176
|
+
[ICF_TEMPLATE_UNIQUE_VALUES, "uniqueValues"],
|
|
177
|
+
[ICF_TEMPLATE_CONTAINS_BLANKS, "containsBlanks"],
|
|
178
|
+
[ICF_TEMPLATE_CONTAINS_NO_BLANKS, "notContainsBlanks"],
|
|
179
|
+
[ICF_TEMPLATE_CONTAINS_ERRORS, "containsErrors"],
|
|
180
|
+
[ICF_TEMPLATE_CONTAINS_NO_ERRORS, "notContainsErrors"],
|
|
181
|
+
[ICF_TEMPLATE_DUPLICATE_VALUES, "duplicateValues"]
|
|
182
|
+
]);
|
|
183
|
+
function readCfFilterRule(icfTemplate, templateParams) {
|
|
184
|
+
if (icfTemplate === ICF_TEMPLATE_TOP10) {
|
|
185
|
+
const cursor = new BlockCursor([templateParams]);
|
|
186
|
+
const flags = cursor.u8();
|
|
187
|
+
const top = (flags & 1) !== 0;
|
|
188
|
+
const percent = (flags >>> 1 & 1) !== 0;
|
|
189
|
+
const rank = cursor.u16();
|
|
190
|
+
if (rank <= 0) return;
|
|
191
|
+
return {
|
|
192
|
+
kind: "top10",
|
|
193
|
+
rank,
|
|
194
|
+
percent,
|
|
195
|
+
bottom: !top
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
if (icfTemplate === ICF_TEMPLATE_ABOVE_AVERAGE || icfTemplate === ICF_TEMPLATE_BELOW_AVERAGE || icfTemplate === ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE || icfTemplate === ICF_TEMPLATE_BELOW_OR_EQUAL_AVERAGE) {
|
|
199
|
+
const iParam = new BlockCursor([templateParams]).u16();
|
|
200
|
+
return {
|
|
201
|
+
kind: "aboveAverage",
|
|
202
|
+
aboveAverage: icfTemplate === ICF_TEMPLATE_ABOVE_AVERAGE || icfTemplate === ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE,
|
|
203
|
+
equalAverage: icfTemplate === ICF_TEMPLATE_ABOVE_OR_EQUAL_AVERAGE || icfTemplate === ICF_TEMPLATE_BELOW_OR_EQUAL_AVERAGE,
|
|
204
|
+
stdDev: iParam > 0 ? iParam : void 0
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const timePeriod = ICF_TEMPLATE_TO_TIME_PERIOD.get(icfTemplate);
|
|
208
|
+
if (timePeriod !== void 0) return {
|
|
209
|
+
kind: "timePeriod",
|
|
210
|
+
timePeriod
|
|
211
|
+
};
|
|
212
|
+
const simpleKind = SIMPLE_ICF_TEMPLATE_KIND.get(icfTemplate);
|
|
213
|
+
if (simpleKind !== void 0) return { kind: simpleKind };
|
|
214
|
+
}
|
|
151
215
|
function readCf12(record, ranges, formulaSheets) {
|
|
152
216
|
try {
|
|
153
217
|
const cursor = new BlockCursor(record.blocks);
|
|
@@ -157,16 +221,16 @@ function readCf12(record, ranges, formulaSheets) {
|
|
|
157
221
|
const cce1 = cursor.u16();
|
|
158
222
|
const cce2 = cursor.u16();
|
|
159
223
|
const cbDxf = cursor.u32();
|
|
160
|
-
cursor.
|
|
224
|
+
const dxfBytes = cursor.take(cbDxf);
|
|
161
225
|
cursor.skip(cce1);
|
|
162
226
|
cursor.skip(cce2);
|
|
163
227
|
const cceActive = cursor.u16();
|
|
164
228
|
cursor.skip(cceActive);
|
|
165
229
|
const stopIfTrue = (cursor.u8() & 2) !== 0;
|
|
166
230
|
const priority = cursor.u16();
|
|
167
|
-
cursor.
|
|
231
|
+
const icfTemplate = cursor.u16();
|
|
168
232
|
cursor.skip(1);
|
|
169
|
-
cursor.
|
|
233
|
+
const templateParams = cursor.take(16);
|
|
170
234
|
const common = {
|
|
171
235
|
priority,
|
|
172
236
|
stopIfTrue,
|
|
@@ -196,6 +260,18 @@ function readCf12(record, ranges, formulaSheets) {
|
|
|
196
260
|
...common
|
|
197
261
|
};
|
|
198
262
|
}
|
|
263
|
+
if (ct === 5) {
|
|
264
|
+
const rule = readCfFilterRule(icfTemplate, templateParams);
|
|
265
|
+
const cbFilter = cursor.u16();
|
|
266
|
+
cursor.skip(cbFilter);
|
|
267
|
+
if (rule === void 0) return;
|
|
268
|
+
const style = parseDxfStyle(dxfBytes);
|
|
269
|
+
return {
|
|
270
|
+
...rule,
|
|
271
|
+
...common,
|
|
272
|
+
style
|
|
273
|
+
};
|
|
274
|
+
}
|
|
199
275
|
return;
|
|
200
276
|
} catch (err) {
|
|
201
277
|
if (!(err instanceof BiffFormatError)) throw err;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { CondFmtGroupResult, RawConditionalFormat, RawConditionalFormatFill, RawConditionalFormatStyle, readCondFmtGroup };
|
|
1
|
+
import { a as parseDxfStyle, i as RawConditionalFormatStyle, n as RawConditionalFormat, o as readCondFmtGroup, r as RawConditionalFormatFill, t as CondFmtGroupResult } from "../conditional-format-Czh2oTzQ.cjs";
|
|
2
|
+
export { CondFmtGroupResult, RawConditionalFormat, RawConditionalFormatFill, RawConditionalFormatStyle, parseDxfStyle, readCondFmtGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { CondFmtGroupResult, RawConditionalFormat, RawConditionalFormatFill, RawConditionalFormatStyle, readCondFmtGroup };
|
|
1
|
+
import { a as parseDxfStyle, i as RawConditionalFormatStyle, n as RawConditionalFormat, o as readCondFmtGroup, r as RawConditionalFormatFill, t as CondFmtGroupResult } from "../conditional-format-DOdazxWe.js";
|
|
2
|
+
export { CondFmtGroupResult, RawConditionalFormat, RawConditionalFormatFill, RawConditionalFormatStyle, parseDxfStyle, readCondFmtGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as readDv, t as RawDataValidation } from "../data-validation-
|
|
1
|
+
import { n as readDv, t as RawDataValidation } from "../data-validation-DfpjUN-N.cjs";
|
|
2
2
|
export { RawDataValidation, readDv };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as readDv, t as RawDataValidation } from "../data-validation-
|
|
1
|
+
import { n as readDv, t as RawDataValidation } from "../data-validation-BXvIVU0e.js";
|
|
2
2
|
export { RawDataValidation, readDv };
|