xlsx-svelte-viewer 0.3.2 → 0.3.4
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 +52 -11
- package/dist/runtime.js +1663 -1753
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
# xlsx-svelte-viewer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/xlsx-svelte-viewer)
|
|
4
|
+
[](https://github.com/ChristopherVR/xlsx-viewer/blob/main/LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/xlsx-svelte-viewer)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
> A browser Excel spreadsheet editor for Svelte 5, using one shared editor and the canonical OOXML document engine.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
[Live demo](https://christophervr.github.io/xlsx-viewer/demo/) | [npm](https://www.npmjs.com/package/xlsx-svelte-viewer) | [Full docs](https://christophervr.github.io/xlsx-viewer/) | [Source](https://github.com/ChristopherVR/xlsx-viewer)
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install xlsx-svelte-viewer
|
|
9
15
|
```
|
|
10
16
|
|
|
17
|
+
Use the framework peers declared by this package: `svelte` (`^5.0.0`). Existing framework apps normally already provide them.
|
|
18
|
+
|
|
19
|
+
The package bundles its editor UI and adapter. The core model and shared controls
|
|
20
|
+
are installed as regular registry dependencies and the model API is re-exported.
|
|
21
|
+
One viewer package is enough; no separate core install is required.
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
11
25
|
```svelte
|
|
12
26
|
<script>
|
|
13
27
|
import XlsxEditor from 'xlsx-svelte-viewer';
|
|
@@ -17,13 +31,40 @@ npm install xlsx-svelte-viewer svelte
|
|
|
17
31
|
<XlsxEditor {workbook} onworkbookchange={(next) => (workbook = next)} />
|
|
18
32
|
```
|
|
19
33
|
|
|
20
|
-
|
|
34
|
+
Mount in the browser and give the host a height. Use one editor package per
|
|
35
|
+
application: each registers the same editor custom element.
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
| Feature | Description |
|
|
40
|
+
| ---------- | ----------------------------------------------------------------------------------- |
|
|
41
|
+
| Editing | Shared grid, ribbon, formula bar, sheet tabs and workbook change events. |
|
|
42
|
+
| Files | XLSX, XLSM, XLTX, legacy XLS and CSV loading through core. |
|
|
43
|
+
| Model | `createWorkbook`, `loadWorkbook`, `saveXlsx` and core types from the package entry. |
|
|
44
|
+
| Frameworks | The same `<xlsx-editor>` UI behind six thin adapters. |
|
|
45
|
+
|
|
46
|
+
## API
|
|
47
|
+
|
|
48
|
+
Shared option types, `loadWorkbook` and `detectWorkbookFormat` helpers are exported
|
|
49
|
+
from the package. `mountEditor(container, options)` returns an imperative binding
|
|
50
|
+
with `load`, `save` and `destroy`. `ooxml-core` and `ooxml-ui` are regular
|
|
51
|
+
dependencies. Parsing, formulas, editing and grid calculations live in core.
|
|
52
|
+
|
|
53
|
+
The root exports the Svelte component; JavaScript helpers and model exports are
|
|
54
|
+
under `xlsx-svelte-viewer/runtime`.
|
|
55
|
+
|
|
56
|
+
## Limitations
|
|
57
|
+
|
|
58
|
+
This is an early editor, without Microsoft Excel parity or guaranteed lossless
|
|
59
|
+
saving for unsupported features. Legacy XLS input saves as XLSX. Pivot tables,
|
|
60
|
+
slicers and sparklines are not editable; macros never execute. Review core
|
|
61
|
+
diagnostics and the feature guide before relying on preservation.
|
|
62
|
+
|
|
63
|
+
## Documentation
|
|
21
64
|
|
|
22
|
-
|
|
65
|
+
[Framework guide](https://christophervr.github.io/xlsx-viewer/frameworks/svelte) |
|
|
66
|
+
[Bindings](https://christophervr.github.io/xlsx-viewer/bindings)
|
|
23
67
|
|
|
24
|
-
|
|
25
|
-
- svelte is a peer dependency. `ooxml-core` and `ooxml-ui` are regular dependencies; never import `ooxml-ui` yourself.
|
|
26
|
-
- Use one editor package per application: each bundles its own copy of the editor and registers the `<xlsx-editor>` element.
|
|
27
|
-
- An early editor: not Microsoft Excel parity, and saving is not lossless for unsupported features (pivot tables, slicers, sparklines and macros are kept but not editable). See the [features and limitations](https://christophervr.github.io/xlsx-viewer/features).
|
|
68
|
+
## License
|
|
28
69
|
|
|
29
|
-
|
|
70
|
+
Apache-2.0.
|