@cellrune/node 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CellRune contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # `@cellrune/node`
2
+
3
+ Node.js bindings for CellRune, a headless XLSX/XLSM reader, deterministic
4
+ calculation engine, editor, and writer.
5
+
6
+ ## Requirements
7
+
8
+ - Node.js 22 or newer
9
+ - A supported macOS, Linux, or Windows platform
10
+
11
+ The package installs the matching native package through an optional
12
+ dependency. You do not need to select a platform package yourself.
13
+
14
+ ## Install
15
+
16
+ ```console
17
+ npm install @cellrune/node@0.1.0
18
+ ```
19
+
20
+ ## CommonJS
21
+
22
+ ```js
23
+ const { Workbook } = require("@cellrune/node");
24
+
25
+ async function main() {
26
+ const workbook = Workbook.create();
27
+ try {
28
+ workbook.setNumber("Sheet1", "A1", 41);
29
+ workbook.setFormula("Sheet1", "B1", "=A1+1");
30
+ await workbook.calculate();
31
+ await workbook.save("output.xlsx");
32
+ } finally {
33
+ workbook.close();
34
+ }
35
+ }
36
+
37
+ main().catch((error) => {
38
+ console.error(error);
39
+ process.exitCode = 1;
40
+ });
41
+ ```
42
+
43
+ ## ES modules
44
+
45
+ ```js
46
+ import { Workbook } from "@cellrune/node";
47
+
48
+ const workbook = await Workbook.openPath("input.xlsx");
49
+ try {
50
+ const page = workbook.readRange("Sheet1", "A1", "D20", { limit: 80 });
51
+ console.log(page.cells);
52
+ } finally {
53
+ workbook.close();
54
+ }
55
+ ```
56
+
57
+ `Workbook` supports typed errors, revision-checked edit batches, incremental
58
+ calculation deltas, and deterministic `todaySerial` and `nowSerial` inputs.
59
+ `close()` is idempotent. Once it returns, the binding-owned native session has
60
+ been released. An active calculation is cooperatively cancelled, and later
61
+ operations fail with `interop.session.closed`.
62
+ See the declarations bundled with the package for the complete API.
63
+
64
+ CellRune is licensed under the MIT License. The native package's dependency
65
+ notices are in `THIRD_PARTY_LICENSES.md`.