openjsxl 0.2.1 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +16 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  [![types included](https://img.shields.io/npm/types/openjsxl)](https://www.npmjs.com/package/openjsxl)
6
6
  [![license: MIT](https://img.shields.io/npm/l/openjsxl?color=blue)](./LICENSE)
7
7
 
8
- Fast, **zero-dependency**, TypeScript-first Excel (`.xlsx`) reader for JavaScript runtimes —
9
- Node, Deno, Bun, the browser, and edge. This is the package to install; it re-exports the
10
- [`@openjsxl/core`](https://www.npmjs.com/package/@openjsxl/core) engine.
8
+ Fast, **zero-dependency**, TypeScript-first Excel (`.xlsx`) reader **and writer** for JavaScript
9
+ runtimes — Node, Deno, Bun, the browser, and edge. This is the package to install; it re-exports
10
+ the [`@openjsxl/core`](https://www.npmjs.com/package/@openjsxl/core) engine.
11
11
 
12
12
  ```sh
13
13
  npm install openjsxl
@@ -33,6 +33,19 @@ For very large sheets use `streamSheetRows` (constant memory); a worksheet also
33
33
  `numberFormat`, `dimension`, `mergedCells`, `hyperlinks`, `comments`, and `visible`, and the
34
34
  reader throws a typed `XlsxError` (with a discriminating `code`) on malformed input.
35
35
 
36
+ **Writing (0.3):** describe a workbook as plain data and get back `.xlsx` bytes — cell types are
37
+ inferred from the JS values:
38
+
39
+ ```ts
40
+ import { writeXlsx } from 'openjsxl'
41
+
42
+ const bytes = await writeXlsx({
43
+ sheets: [{ name: 'Report', rows: [['Item', 'Added'], ['Apples', new Date('2024-01-15')]] }],
44
+ })
45
+ ```
46
+
47
+ `workbookToInput` turns an open `Workbook` back into writer input for read → modify → write.
48
+
36
49
  See the [project README](https://github.com/joaquimserafim/openjsxl#readme) for the full guide,
37
50
  design notes, and roadmap.
38
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openjsxl",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Fast, zero-dependency Excel (.xlsx) reader and writer for Node, Deno, Bun, and the browser.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "sideEffects": false,
32
32
  "dependencies": {
33
- "@openjsxl/core": "0.2.1"
33
+ "@openjsxl/core": "0.3.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@openjsxl/fixtures": "0.0.0"