@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 CHANGED
@@ -4,7 +4,7 @@
4
4
  ![npm downloads](https://img.shields.io/npm/dw/@office-open/xlsx)
5
5
  ![npm license](https://img.shields.io/npm/l/@office-open/xlsx)
6
6
 
7
- > Generate and parse .xlsx spreadsheets with a declarative TypeScript API. Works in Node.js and browsers.
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) | 2,040 ops/s | 1,096 ops/s | 21,165 ops/s | 21,851 ops/s | 854 ops/s |
88
- | Styled rows (20) | 1,894 ops/s | 1,107 ops/s | 18,327 ops/s | 18,581 ops/s | 815 ops/s |
89
- | Table (10x5) | 2,017 ops/s | 1,148 ops/s | 17,836 ops/s | 16,761 ops/s | 865 ops/s |
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 | 110 ops/s | 127 ops/s | 127 ops/s | 134 ops/s | 43.7 ops/s |
96
- | 200x10 table | 821 ops/s | 610 ops/s | 1,253 ops/s | 1,172 ops/s | 251 ops/s |
97
- | 20 sheets × 100 rows + 20 img | 73.8 ops/s | 56.9 ops/s | 96 ops/s | 99 ops/s | 22.8 ops/s |
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.86 ops/s | 0.84 ops/s | 1.01 ops/s | 0.92 ops/s | 0.40 ops/s |
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