@office-open/xlsx 0.10.15 → 0.11.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 +20 -16
- package/dist/index.d.mts +2777 -443
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +10268 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -28
- package/dist/chart.d.mts +0 -1
- package/dist/chart.mjs +0 -2
- package/dist/comments-CUChd469.mjs +0 -1776
- package/dist/comments-CUChd469.mjs.map +0 -1
- package/dist/context-eqnGd7of.mjs +0 -4106
- package/dist/context-eqnGd7of.mjs.map +0 -1
- package/dist/drawingml.d.mts +0 -1
- package/dist/drawingml.mjs +0 -2
- package/dist/file-CaB6L83w.d.mts +0 -589
- package/dist/file-CaB6L83w.d.mts.map +0 -1
- package/dist/generate-CSB0G2BY.mjs +0 -842
- package/dist/generate-CSB0G2BY.mjs.map +0 -1
- package/dist/generate.d.mts +0 -10
- package/dist/generate.d.mts.map +0 -1
- package/dist/generate.mjs +0 -2
- package/dist/parse.d.mts +0 -27
- package/dist/parse.d.mts.map +0 -1
- package/dist/parse.mjs +0 -316
- package/dist/parse.mjs.map +0 -1
- package/dist/patch.d.mts +0 -29
- package/dist/patch.d.mts.map +0 -1
- package/dist/patch.mjs +0 -460
- package/dist/patch.mjs.map +0 -1
- package/dist/smartart.d.mts +0 -1
- package/dist/smartart.mjs +0 -2
- package/dist/worksheet-CY6qn25N.d.mts +0 -1448
- package/dist/worksheet-CY6qn25N.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> Create Excel spreadsheets (.xlsx) in TypeScript and JavaScript — generate, parse, and patch from plain JSON, no Microsoft Office required. Built for AI agents and hand-written code alike; runs in Node.js, browsers, Deno, and Bun.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
@@ -78,29 +78,33 @@ Performance comparison against [hucre](https://github.com/nicolo-ribaudo/hucre)
|
|
|
78
78
|
await generateWorkbook(options);
|
|
79
79
|
// All STORE (no compression)
|
|
80
80
|
await generateWorkbook(options, { compression: { xml: 0, media: 0 } });
|
|
81
|
+
// Stream as ReadableStream<Uint8Array> (pipe to a file / HTTP response)
|
|
82
|
+
generateWorkbookStream(options);
|
|
81
83
|
```
|
|
82
84
|
|
|
83
|
-
**Create + toBuffer (end-to-end)**
|
|
85
|
+
**Create + toBuffer / toStream (end-to-end)**
|
|
84
86
|
|
|
85
|
-
| Scenario | Default sync | Default async | All STORE sync | All STORE async | hucre |
|
|
86
|
-
| ---------------- | -----------: | ------------: | -------------: | --------------: | --------: |
|
|
87
|
-
| Simple (3 rows) |
|
|
88
|
-
| Styled rows (20) |
|
|
89
|
-
| Table (10x5) |
|
|
87
|
+
| Scenario | Default sync | Default async | All STORE sync | All STORE async | Default stream | hucre |
|
|
88
|
+
| ---------------- | -----------: | ------------: | -------------: | --------------: | -------------: | --------: |
|
|
89
|
+
| Simple (3 rows) | 1,923 ops/s | 1,115 ops/s | 18,126 ops/s | 16,147 ops/s | 22.0 ops/s | 782 ops/s |
|
|
90
|
+
| Styled rows (20) | 2,120 ops/s | 1,199 ops/s | 16,476 ops/s | 16,039 ops/s | 21.5 ops/s | 797 ops/s |
|
|
91
|
+
| Table (10x5) | 1,847 ops/s | 1,105 ops/s | 16,181 ops/s | 16,204 ops/s | 21.9 ops/s | 875 ops/s |
|
|
90
92
|
|
|
91
|
-
**Large Files — Create + toBuffer**
|
|
93
|
+
**Large Files — Create + toBuffer / toStream**
|
|
92
94
|
|
|
93
|
-
| Scenario | Default sync | Default async | All STORE sync | All STORE async | hucre |
|
|
94
|
-
| ----------------------------- | -----------: | ------------: | -------------: | --------------: | ---------: |
|
|
95
|
-
| 2000 rows + 10 images |
|
|
96
|
-
| 200x10 table |
|
|
97
|
-
| 20 sheets × 100 rows + 20 img |
|
|
95
|
+
| Scenario | Default sync | Default async | All STORE sync | All STORE async | Default stream | hucre |
|
|
96
|
+
| ----------------------------- | -----------: | ------------: | -------------: | --------------: | -------------: | ---------: |
|
|
97
|
+
| 2000 rows + 10 images | 131 ops/s | 138 ops/s | 135 ops/s | 140 ops/s | 12.1 ops/s | 42.2 ops/s |
|
|
98
|
+
| 200x10 table | 834 ops/s | 610 ops/s | 1,357 ops/s | 1,337 ops/s | 19.9 ops/s | 242 ops/s |
|
|
99
|
+
| 20 sheets × 100 rows + 20 img | 71.1 ops/s | 53.3 ops/s | 97.3 ops/s | 101 ops/s | 2.26 ops/s | 24.3 ops/s |
|
|
98
100
|
|
|
99
101
|
**Large Data — 100,000 rows × 20 columns (2M cells)**
|
|
100
102
|
|
|
101
|
-
| Scenario | Default sync | Default async | All STORE sync | All STORE async | hucre |
|
|
102
|
-
| --------- | -----------: | ------------: | -------------: | --------------: | ---------: |
|
|
103
|
-
| 100k × 20 | 0.
|
|
103
|
+
| Scenario | Default sync | Default async | All STORE sync | All STORE async | Default stream | hucre |
|
|
104
|
+
| --------- | -----------: | ------------: | -------------: | --------------: | -------------: | ---------: |
|
|
105
|
+
| 100k × 20 | 0.92 ops/s | 0.90 ops/s | 1.16 ops/s | 1.03 ops/s | 0.96 ops/s | 0.38 ops/s |
|
|
106
|
+
|
|
107
|
+
**Stream column** = `generateWorkbookStream` (default compression, fully drained). Streaming trades throughput for pipeability: each part is compressed in a Web Worker as it is produced, so a fixed per-part worker handoff dominates small workbooks. Plain-data workbooks stream through a constant-memory path — worksheet rows serialize chunk-wise with inline strings, so the full worksheet XML and the archive never coexist (at 1M rows × 3 cols: peak RSS +177 MB streamed vs +810 MB buffered, and ~17% faster; at 100k × 20 it is also the fastest mode). Scenarios with images fall back to the full-memory stream.
|
|
104
108
|
|
|
105
109
|
## License
|
|
106
110
|
|