openjsxl 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 +21 -0
- package/README.md +36 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 openjsxl 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,36 @@
|
|
|
1
|
+
# openjsxl
|
|
2
|
+
|
|
3
|
+
Fast, **zero-dependency**, TypeScript-first Excel (`.xlsx`) reader for JavaScript runtimes —
|
|
4
|
+
Node, Deno, Bun, the browser, and edge. This is the package to install; it re-exports the
|
|
5
|
+
[`@openjsxl/core`](https://www.npmjs.com/package/@openjsxl/core) engine.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install openjsxl
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { openXlsx } from 'openjsxl'
|
|
13
|
+
import { readFile } from 'node:fs/promises'
|
|
14
|
+
|
|
15
|
+
const wb = await openXlsx(await readFile('data.xlsx'))
|
|
16
|
+
|
|
17
|
+
// Typed cells: narrowing on `cell.type` gives a correctly typed `cell.value`.
|
|
18
|
+
const a1 = wb.sheet('Sheet1').cell('A1')
|
|
19
|
+
console.log(a1.type, a1.value) // e.g. "string" "hello"
|
|
20
|
+
|
|
21
|
+
// Stream a whole sheet, row at a time.
|
|
22
|
+
for await (const row of wb.sheet(wb.sheets[0].name).rows()) {
|
|
23
|
+
console.log(row.index, row.cells.map((c) => c.value))
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For very large sheets use `streamSheetRows` (constant memory); a worksheet also exposes
|
|
28
|
+
`numberFormat`, `dimension`, `mergedCells`, `hyperlinks`, `comments`, and `visible`, and the
|
|
29
|
+
reader throws a typed `XlsxError` (with a discriminating `code`) on malformed input.
|
|
30
|
+
|
|
31
|
+
See the [project README](https://github.com/joaquimserafim/openjsxl#readme) for the full guide,
|
|
32
|
+
design notes, and roadmap.
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@openjsxl/core';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "openjsxl",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Fast, zero-dependency Excel (.xlsx) reader and writer for Node, Deno, Bun, and the browser.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "joaquimserafim (https://github.com/joaquimserafim)",
|
|
8
|
+
"homepage": "https://github.com/joaquimserafim/openjsxl#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/joaquimserafim/openjsxl.git",
|
|
12
|
+
"directory": "packages/openjsxl"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/joaquimserafim/openjsxl/issues"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=24"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"main": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@openjsxl/core": "0.1.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@openjsxl/fixtures": "0.0.0"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"xlsx",
|
|
40
|
+
"excel",
|
|
41
|
+
"spreadsheet",
|
|
42
|
+
"ooxml",
|
|
43
|
+
"reader",
|
|
44
|
+
"writer",
|
|
45
|
+
"openpyxl",
|
|
46
|
+
"calamine"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsup",
|
|
53
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
54
|
+
}
|
|
55
|
+
}
|