javascript-excel 2.0.0-alpha.1 → 2.0.0-alpha.3
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 +164 -15
- package/dist/address-DUn7-5OS.js +75 -0
- package/dist/address-DZBHchLv.cjs +122 -0
- package/dist/{auto-width-2oBzjeNG.d.cts → auto-width-DRHsPKNk.d.cts} +1 -1
- package/dist/cells-CPXU722t.cjs +33 -0
- package/dist/cells-CrMF8h_t.js +28 -0
- package/dist/colors-B8Nf_xTx.js +114 -0
- package/dist/colors-oBpjx97l.cjs +119 -0
- package/dist/csv-DyVH9y7S.cjs +647 -0
- package/dist/csv-pXfaputs.js +618 -0
- package/dist/csv.cjs +6 -622
- package/dist/csv.d.cts +4 -1
- package/dist/csv.d.ts +4 -1
- package/dist/csv.js +1 -618
- package/dist/dataset-KeMzHCGl.js +664 -0
- package/dist/dataset-UUZCzsi3.cjs +687 -0
- package/dist/dates-BXcSWf9_.js +64 -0
- package/dist/dates-CA1dCizp.cjs +75 -0
- package/dist/dom.cjs +7 -28
- package/dist/dom.d.cts +5 -2
- package/dist/dom.d.ts +4 -1
- package/dist/dom.js +6 -27
- package/dist/{numfmt-B-TlCgr7.cjs → dos-time-FZ7-1tot.cjs} +36 -199
- package/dist/{numfmt-DEm0sYBJ.js → dos-time-dD0z1YWU.js} +36 -181
- package/dist/format.cjs +1264 -0
- package/dist/format.d.cts +59 -0
- package/dist/format.d.ts +59 -0
- package/dist/format.js +1262 -0
- package/dist/import.cjs +10 -0
- package/dist/import.d.cts +10 -0
- package/dist/import.d.ts +10 -0
- package/dist/import.js +1 -0
- package/dist/index.cjs +28 -1408
- package/dist/index.d.cts +149 -8
- package/dist/index.d.ts +148 -7
- package/dist/index.js +11 -1395
- package/dist/iso-date-3TY1OlGd.cjs +57 -0
- package/dist/iso-date-CXnn-9mT.js +46 -0
- package/dist/{warnings-C_12PT4t.d.cts → model-0JikLfuM.d.cts} +1 -41
- package/dist/{warnings-DXJKe1lx.d.ts → model-0JikLfuM.d.ts} +1 -41
- package/dist/numfmt-BmEbm78Y.cjs +125 -0
- package/dist/numfmt-DCDrX9P1.js +114 -0
- package/dist/pipeline-BAJtzBdW.js +1085 -0
- package/dist/pipeline-Bnf7EU3X.cjs +1132 -0
- package/dist/pipeline-CctEa86r.d.cts +186 -0
- package/dist/pipeline-I8SLmV9S.d.ts +186 -0
- package/dist/read-CZEWV4rK.cjs +3096 -0
- package/dist/read-LWti17lz.js +3073 -0
- package/dist/read.cjs +5 -2898
- package/dist/read.d.cts +13 -12
- package/dist/read.d.ts +13 -12
- package/dist/read.js +1 -2895
- package/dist/render.cjs +751 -0
- package/dist/render.d.cts +215 -0
- package/dist/render.d.ts +215 -0
- package/dist/render.js +732 -0
- package/dist/{sheet-names-CDsVK15c.js → sheet-names-7p-joVsG.js} +4 -102
- package/dist/{sheet-names-Cm-IhbBk.cjs → sheet-names-B8U5RAW0.cjs} +16 -168
- package/dist/warnings-B1v58nCZ.d.cts +41 -0
- package/dist/warnings-B1v58nCZ.d.ts +41 -0
- package/dist/worker.cjs +244 -7
- package/dist/worker.d.cts +68 -5
- package/dist/worker.d.ts +68 -5
- package/dist/worker.js +243 -7
- package/dist/{write-CYpLGuzl.d.ts → write-DM6ieuQY.d.ts} +2 -1
- package/dist/write-DjgWy1PK.js +1473 -0
- package/dist/{write-C5JgeIar.d.cts → write-DtjfdIFm.d.cts} +2 -1
- package/dist/write-f9kcYf5K.cjs +1490 -0
- package/package.json +77 -12
- package/dist/iso-date-B22IvwL1.js +0 -21
- package/dist/iso-date-BSUsPSWO.cjs +0 -26
package/dist/read.d.cts
CHANGED
|
@@ -7,19 +7,13 @@
|
|
|
7
7
|
* because the tokenizer ignores namespace prefixes and relationship types
|
|
8
8
|
* are matched by their last path segment, which both variants share.
|
|
9
9
|
* .xlsm, .xltx and .xltm read like .xlsx; macros are never read or run.
|
|
10
|
-
*/
|
|
11
|
-
import { A as RichTextRun, C as GradientFill, D as PatternType, E as PatternFill, F as Theme, I as Workbook, M as Sheet, N as SheetView, O as PrintSetup, P as Style, S as Font, T as NumFmt, _ as ColumnWidth, a as BlobType, b as ErrorCode, c as BorderSide, d as CellErrorValue, f as CellInput, g as ColumnProps, h as Color, i as BlobLike, j as RowProps, k as RichText, l as BorderStyle, m as CellValue, n as ExcelWarningCode, o as Alignment, p as CellType, r as BinaryInput, s as Border, t as ExcelWarning, u as Cell, v as DefinedName, w as Hyperlink, x as Fill, y as DocProperties } from "./warnings-C_12PT4t.cjs";
|
|
12
|
-
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.cjs";
|
|
13
|
-
import { t as Progress } from "./write-C5JgeIar.cjs";
|
|
14
|
-
/**
|
|
15
|
-
* Format detection tables for the reader (docs/api.md §5.2). Internal.
|
|
16
10
|
*
|
|
17
|
-
*
|
|
18
|
-
* workbook part's content type. Supporting another format later (.xlsb, .xls)
|
|
19
|
-
* is one more row plus a decoder; the reader dispatches on `decoder`.
|
|
11
|
+
* @module javascript-excel/read
|
|
20
12
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
import { a as BlobType, i as BlobLike, n as ExcelWarningCode, r as BinaryInput, t as ExcelWarning } from "./warnings-B1v58nCZ.cjs";
|
|
14
|
+
import { A as Theme, C as PrintSetup, D as Sheet, E as RowProps, O as SheetView, S as PatternType, T as RichTextRun, _ as Font, a as Cell, b as NumFmt, c as CellType, d as ColumnProps, f as ColumnWidth, g as Fill, h as ErrorCode, i as BorderStyle, j as Workbook, k as Style, l as CellValue, m as DocProperties, n as Border, o as CellErrorValue, p as DefinedName, r as BorderSide, s as CellInput, t as Alignment, u as Color, v as GradientFill, w as RichText, x as PatternFill, y as Hyperlink } from "./model-0JikLfuM.cjs";
|
|
15
|
+
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.cjs";
|
|
16
|
+
import { t as Progress } from "./write-DtjfdIFm.cjs";
|
|
23
17
|
/** Result of `read`. */
|
|
24
18
|
export interface ReadResult {
|
|
25
19
|
workbook: Workbook<Cell>;
|
|
@@ -39,6 +33,13 @@ export interface ReadOptions {
|
|
|
39
33
|
dateZone?: "local" | "utc" | undefined;
|
|
40
34
|
/** Rich text as runs (default) or flattened to a plain string. */
|
|
41
35
|
richText?: "runs" | "plain" | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Read only the first `maxRows` rows of each parsed sheet (zero-based rows
|
|
38
|
+
* 0..maxRows-1). Later rows are skipped without building cells, with one
|
|
39
|
+
* `ROWS_TRUNCATED` warning per sheet; merges, views and the other sheet
|
|
40
|
+
* features after the cell data are still read. Default: all rows.
|
|
41
|
+
*/
|
|
42
|
+
maxRows?: number | undefined;
|
|
42
43
|
limits?: Partial<ReadLimits> | undefined;
|
|
43
44
|
/** Rejects with `signal.reason` when aborted. */
|
|
44
45
|
signal?: AbortSignalLike | undefined;
|
|
@@ -75,7 +76,7 @@ export interface SheetInfo {
|
|
|
75
76
|
* What `detectFormat` recognises. `'cfb'` is a legacy `.xls` or an encrypted OOXML file.
|
|
76
77
|
* `read` reads xlsx, xlsm, xltx and xltm; the others are rejected with UNSUPPORTED_FORMAT.
|
|
77
78
|
*/
|
|
78
|
-
export type DetectedFormat =
|
|
79
|
+
export type DetectedFormat = "xlsx" | "xlsm" | "xltx" | "xltm" | "xlsb" | "ods" | "cfb" | "zip" | "unknown";
|
|
79
80
|
/** Detects the file format from the bytes. Never throws for unreadable input; returns `'unknown'` or `'zip'` instead. */
|
|
80
81
|
export declare function detectFormat(input: BinaryInput): Promise<DetectedFormat>;
|
|
81
82
|
/** Lists the worksheets (name, index, visibility) without parsing any sheet. */
|
package/dist/read.d.ts
CHANGED
|
@@ -7,19 +7,13 @@
|
|
|
7
7
|
* because the tokenizer ignores namespace prefixes and relationship types
|
|
8
8
|
* are matched by their last path segment, which both variants share.
|
|
9
9
|
* .xlsm, .xltx and .xltm read like .xlsx; macros are never read or run.
|
|
10
|
-
*/
|
|
11
|
-
import { A as SheetView, C as PatternFill, D as RichTextRun, E as RichText, F as BlobLike, I as BlobType, M as Theme, N as Workbook, O as RowProps, P as BinaryInput, S as NumFmt, T as PrintSetup, _ as ErrorCode, a as BorderSide, b as GradientFill, c as CellErrorValue, d as CellValue, f as Color, g as DocProperties, h as DefinedName, i as Border, j as Style, k as Sheet, l as CellInput, m as ColumnWidth, n as ExcelWarningCode, o as BorderStyle, p as ColumnProps, r as Alignment, s as Cell, t as ExcelWarning, u as CellType, v as Fill, w as PatternType, x as Hyperlink, y as Font } from "./warnings-DXJKe1lx.js";
|
|
12
|
-
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.js";
|
|
13
|
-
import { t as Progress } from "./write-CYpLGuzl.js";
|
|
14
|
-
/**
|
|
15
|
-
* Format detection tables for the reader (docs/api.md §5.2). Internal.
|
|
16
10
|
*
|
|
17
|
-
*
|
|
18
|
-
* workbook part's content type. Supporting another format later (.xlsb, .xls)
|
|
19
|
-
* is one more row plus a decoder; the reader dispatches on `decoder`.
|
|
11
|
+
* @module javascript-excel/read
|
|
20
12
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
import { a as BlobType, i as BlobLike, n as ExcelWarningCode, r as BinaryInput, t as ExcelWarning } from "./warnings-B1v58nCZ.js";
|
|
14
|
+
import { A as Theme, C as PrintSetup, D as Sheet, E as RowProps, O as SheetView, S as PatternType, T as RichTextRun, _ as Font, a as Cell, b as NumFmt, c as CellType, d as ColumnProps, f as ColumnWidth, g as Fill, h as ErrorCode, i as BorderStyle, j as Workbook, k as Style, l as CellValue, m as DocProperties, n as Border, o as CellErrorValue, p as DefinedName, r as BorderSide, s as CellInput, t as Alignment, u as Color, v as GradientFill, w as RichText, x as PatternFill, y as Hyperlink } from "./model-0JikLfuM.js";
|
|
15
|
+
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.js";
|
|
16
|
+
import { t as Progress } from "./write-DM6ieuQY.js";
|
|
23
17
|
/** Result of `read`. */
|
|
24
18
|
export interface ReadResult {
|
|
25
19
|
workbook: Workbook<Cell>;
|
|
@@ -39,6 +33,13 @@ export interface ReadOptions {
|
|
|
39
33
|
dateZone?: "local" | "utc" | undefined;
|
|
40
34
|
/** Rich text as runs (default) or flattened to a plain string. */
|
|
41
35
|
richText?: "runs" | "plain" | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Read only the first `maxRows` rows of each parsed sheet (zero-based rows
|
|
38
|
+
* 0..maxRows-1). Later rows are skipped without building cells, with one
|
|
39
|
+
* `ROWS_TRUNCATED` warning per sheet; merges, views and the other sheet
|
|
40
|
+
* features after the cell data are still read. Default: all rows.
|
|
41
|
+
*/
|
|
42
|
+
maxRows?: number | undefined;
|
|
42
43
|
limits?: Partial<ReadLimits> | undefined;
|
|
43
44
|
/** Rejects with `signal.reason` when aborted. */
|
|
44
45
|
signal?: AbortSignalLike | undefined;
|
|
@@ -75,7 +76,7 @@ export interface SheetInfo {
|
|
|
75
76
|
* What `detectFormat` recognises. `'cfb'` is a legacy `.xls` or an encrypted OOXML file.
|
|
76
77
|
* `read` reads xlsx, xlsm, xltx and xltm; the others are rejected with UNSUPPORTED_FORMAT.
|
|
77
78
|
*/
|
|
78
|
-
export type DetectedFormat =
|
|
79
|
+
export type DetectedFormat = "xlsx" | "xlsm" | "xltx" | "xltm" | "xlsb" | "ods" | "cfb" | "zip" | "unknown";
|
|
79
80
|
/** Detects the file format from the bytes. Never throws for unreadable input; returns `'unknown'` or `'zip'` instead. */
|
|
80
81
|
export declare function detectFormat(input: BinaryInput): Promise<DetectedFormat>;
|
|
81
82
|
/** Lists the worksheets (name, index, visibility) without parsing any sheet. */
|