@sheetpane/mcp 0.3.0 → 0.4.1
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 +2 -1
- package/dist/ERRORS.md +270 -1
- package/dist/custom-elements.json +292 -27
- package/dist/plugins.json +6 -0
- package/dist/tools.d.ts +10 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +110 -47
- package/dist/tools.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -12,9 +12,10 @@ npx sheetpane-skills install # registers it for Claude Code, Kiro and Codex (wit
|
|
|
12
12
|
| `describe_api` | `{ "name": "flagging" }` — an element, attribute, property, method, event, `--sp-*` property, slot, part or plugin | its entry in `custom-elements.json` (with its TSDoc) and the record that specifies it |
|
|
13
13
|
| `inspect_workbook` | `{ "path": "data/q3.xlsx" }` | sheets, size, header-row guess, titles, each column's type, blanks and values, merges, and which plugins the file would use — `@sheetpane/import` |
|
|
14
14
|
| `draft_rules` | `{ "path": "data/q3.xlsx", "sheet"?: "Sales" }` | a rules file for `<sheetpane-excel rules-src>`: `required`, `type`, `oneOf` per titled column — **a draft to review** |
|
|
15
|
-
| `check_rules` | `{ "rules": {…} or "…json…", "path"?: "data/q3.xlsx" }` | the grid's own check, each rule in words,
|
|
15
|
+
| `check_rules` | `{ "rules": {…} or "…json…", "path"?: "data/q3.xlsx" }` | the grid's own check, each rule in words; with a workbook, the pane's own `check()` over it — the sheets and titles it lacks, and the cells that fail |
|
|
16
16
|
| `explain_code` | `{ "code": "SP-1002" }` | meaning, likely cause, fix and link — [docs/ERRORS.md](../../docs/ERRORS.md) |
|
|
17
17
|
| `find_skill` | `{ "task": "validate columns from a JSON file" }` | the skill to read, with its `SKILL.md` path |
|
|
18
|
+
| `diff_workbooks` | `{ "base": "spec-v1.xlsx", "path": "spec-v2.xlsx", "key"?: "Account" }` | what changed: sheets added, removed, renamed; rows added, removed, changed, moved; cells was → now — `@sheetpane/compare` |
|
|
18
19
|
|
|
19
20
|
## Registering it by hand
|
|
20
21
|
|
package/dist/ERRORS.md
CHANGED
|
@@ -36,7 +36,7 @@ code's title and severity; this page holds the long text. The repo test
|
|
|
36
36
|
| 2xxx | `@sheetpane/export` — writing a file, the ZIP walk, `download()` (21xx) |
|
|
37
37
|
| 3xxx | `@sheetpane/grid` — the store, the plugin host, `<sheetpane-excel>` |
|
|
38
38
|
| 4xxx | `<sheetpane-errors>` — none raised yet |
|
|
39
|
-
| 5xxx | plugins — 5100 numfmt · 5200 formulas · 5300 styles · 5400 validation · 5500 condfmt · 5600 images · 5700 charts · 5800 comments |
|
|
39
|
+
| 5xxx | plugins — 5100 numfmt · 5200 formulas · 5300 styles · 5400 validation · 5500 condfmt · 5600 images · 5700 charts · 5800 comments · 5900 review |
|
|
40
40
|
| 6xxx | column rules and the rules file |
|
|
41
41
|
| 7xxx | `@sheetpane/mcp` — reserved |
|
|
42
42
|
|
|
@@ -53,6 +53,7 @@ code's title and severity; this page holds the long text. The repo test
|
|
|
53
53
|
| [SP-1006](#sp-1006) | File too large | error |
|
|
54
54
|
| [SP-1007](#sp-1007) | Damaged file | error |
|
|
55
55
|
| [SP-1008](#sp-1008) | Reading .xlsx needs a DOM (retired) | error |
|
|
56
|
+
| [SP-1009](#sp-1009) | No SHA-256 without Web Crypto | warning |
|
|
56
57
|
| [SP-2001](#sp-2001) | Invalid sheet name | error |
|
|
57
58
|
| [SP-2002](#sp-2002) | No visible sheet | error |
|
|
58
59
|
| [SP-2003](#sp-2003) | Sheet past Excel’s limits | error |
|
|
@@ -67,6 +68,8 @@ code's title and severity; this page holds the long text. The repo test
|
|
|
67
68
|
| [SP-2012](#sp-2012) | Damaged archive | error |
|
|
68
69
|
| [SP-2013](#sp-2013) | Archive over the size limit | error |
|
|
69
70
|
| [SP-2014](#sp-2014) | Not a workbook package | error |
|
|
71
|
+
| [SP-2015](#sp-2015) | Invalid validation or conditional-format rule | error |
|
|
72
|
+
| [SP-2016](#sp-2016) | Insert or delete refused | error |
|
|
70
73
|
| [SP-2101](#sp-2101) | download() needs a file name | error |
|
|
71
74
|
| [SP-2102](#sp-2102) | Only .xlsx or .csv can be saved | error |
|
|
72
75
|
| [SP-2103](#sp-2103) | File type cannot be told | error |
|
|
@@ -89,16 +92,43 @@ code's title and severity; this page holds the long text. The repo test
|
|
|
89
92
|
| [SP-3013](#sp-3013) | Plugin validate failed | error |
|
|
90
93
|
| [SP-3014](#sp-3014) | Plugin overlay failed | error |
|
|
91
94
|
| [SP-3015](#sp-3015) | Source could not be read | error |
|
|
95
|
+
| [SP-3016](#sp-3016) | Error meta dropped | warning |
|
|
96
|
+
| [SP-3017](#sp-3017) | renderDetail failed | error |
|
|
97
|
+
| [SP-3018](#sp-3018) | Error not accepted | warning |
|
|
98
|
+
| [SP-3019](#sp-3019) | Cell to open at not found | warning |
|
|
99
|
+
| [SP-3020](#sp-3020) | Nothing to check | error |
|
|
100
|
+
| [SP-3021](#sp-3021) | Layer name not valid | warning |
|
|
101
|
+
| [SP-3022](#sp-3022) | Delete would split a merged range | warning |
|
|
102
|
+
| [SP-3023](#sp-3023) | Insert or delete would move a pivot table | warning |
|
|
103
|
+
| [SP-3024](#sp-3024) | Insert would push cells off the sheet | warning |
|
|
104
|
+
| [SP-3025](#sp-3025) | Insert or delete would cut a table | warning |
|
|
105
|
+
| [SP-3026](#sp-3026) | Locked in the file | warning |
|
|
106
|
+
| [SP-3027](#sp-3027) | Nothing to render | error |
|
|
107
|
+
| [SP-3028](#sp-3028) | Cannot render that range | error |
|
|
108
|
+
| [SP-5001](#sp-5001) | Review sheet not written | error |
|
|
109
|
+
| [SP-5002](#sp-5002) | Flagged cells not coloured on a sheet | error |
|
|
110
|
+
| [SP-5003](#sp-5003) | Range too large to colour whole | note |
|
|
111
|
+
| [SP-5004](#sp-5004) | No styles part to colour cells | note |
|
|
112
|
+
| [SP-5005](#sp-5005) | Review fill is not a colour | error |
|
|
92
113
|
| [SP-5101](#sp-5101) | Selection too large to format | warning |
|
|
93
114
|
| [SP-5102](#sp-5102) | Not a style sheet | error |
|
|
94
115
|
| [SP-5103](#sp-5103) | Workbook has no style sheet | error |
|
|
95
116
|
| [SP-5201](#sp-5201) | Recalculation failed | error |
|
|
96
117
|
| [SP-5202](#sp-5202) | Formula engine did not load | error |
|
|
118
|
+
| [SP-5401](#sp-5401) | Rule check Excel validation cannot hold | warning |
|
|
119
|
+
| [SP-5402](#sp-5402) | Rule checks one Excel rule cannot combine | warning |
|
|
120
|
+
| [SP-5403](#sp-5403) | List Excel cannot type out | warning |
|
|
121
|
+
| [SP-5404](#sp-5404) | Rule bound Excel cannot read | warning |
|
|
122
|
+
| [SP-5405](#sp-5405) | No column or sheet for a rule to write | warning |
|
|
123
|
+
| [SP-5406](#sp-5406) | Cells keep the rule they already have | warning |
|
|
124
|
+
| [SP-5407](#sp-5407) | Sheet rules could not be rewritten | warning |
|
|
97
125
|
| [SP-5701](#sp-5701) | Chart part is not well-formed XML | error |
|
|
98
126
|
| [SP-5702](#sp-5702) | Chart part holds no chart | error |
|
|
99
127
|
| [SP-5801](#sp-5801) | Comment part has no container | error |
|
|
100
128
|
| [SP-5802](#sp-5802) | Not a worksheet | error |
|
|
101
129
|
| [SP-5803](#sp-5803) | Comments not written for a sheet | error |
|
|
130
|
+
| [SP-5804](#sp-5804) | Error with no cell not written as a comment | note |
|
|
131
|
+
| [SP-5901](#sp-5901) | Compare key is not a column | error |
|
|
102
132
|
| [SP-6001](#sp-6001) | Column rule pattern is not a regular expression | error |
|
|
103
133
|
| [SP-6002](#sp-6002) | Column-rules validate function failed | error |
|
|
104
134
|
| [SP-6003](#sp-6003) | Value refused by a rule | warning |
|
|
@@ -199,6 +229,14 @@ grid shows it as "Can't open this file" (or the password state) and fires
|
|
|
199
229
|
- **Likely cause:** an older `@sheetpane/import`.
|
|
200
230
|
- **Fix:** upgrade `@sheetpane/import`. The code is kept so it is never reused.
|
|
201
231
|
|
|
232
|
+
### SP-1009
|
|
233
|
+
|
|
234
|
+
**No SHA-256 without Web Crypto** · warning · [SR-IMPORT](../records/0104_IMPORT.md) decision 11 · a console warning, not an `ImportError`
|
|
235
|
+
|
|
236
|
+
- **Meaning:** the file opened (or was exported) but has no fingerprint: `read()`'s `sha256`, and the `sha256` of `sheetpane-load` and `sheetpane-export`, are `undefined`. sheetpane never puts a substitute hash in its place.
|
|
237
|
+
- **Likely cause:** `crypto.subtle` is missing — the page is not a secure context (plain `http://` other than `localhost`, some embedded webviews), or a runtime without Web Crypto (Node before 20); rarely, `crypto.subtle.digest` itself failed.
|
|
238
|
+
- **Fix:** serve the page over `https://` (or from `localhost`); in Node, use version 20 or later.
|
|
239
|
+
|
|
202
240
|
---
|
|
203
241
|
|
|
204
242
|
## 2xxx · export
|
|
@@ -319,6 +357,22 @@ plain `Error`s or `TypeError`s.
|
|
|
319
357
|
- **Likely cause:** the upload was not an `.xlsx`, or the wrong bytes were passed.
|
|
320
358
|
- **Fix:** pass the original workbook's bytes.
|
|
321
359
|
|
|
360
|
+
### SP-2015
|
|
361
|
+
|
|
362
|
+
**Invalid validation or conditional-format rule** · error · [SR-EXPORT](../records/0103_EXPORT.md) · `code: 'bad-rule'`
|
|
363
|
+
|
|
364
|
+
- **Meaning:** a data-validation rule, conditional format or differential format given to `toXlsx` or `patchXlsx` cannot be written as Excel reads it (W-57).
|
|
365
|
+
- **Likely cause:** an empty or malformed `sqref`; an unknown `type`, `operator`, `errorStyle`, `timePeriod`, cfvo type or icon set; a title over 32 or a message over 255 characters; a quoted list over 255 characters; a conditional format with no rule; a `dxfId` the workbook has no format for; a colour scale, data bar or icon set without the thresholds or colour it needs.
|
|
366
|
+
- **Fix:** correct the rule the message names. Put a long list on a sheet and point `formula1` at the range; add the format to `dxfs` before naming its `dxfId`.
|
|
367
|
+
|
|
368
|
+
### SP-2016
|
|
369
|
+
|
|
370
|
+
**Insert or delete refused** · error · [SR-EXPORT](../records/0103_EXPORT.md) decision 11 · `code: 'bad-structure'`
|
|
371
|
+
|
|
372
|
+
- **Meaning:** `patchXlsx`'s `structure` option would have to move something it does not rewrite — a pivot table or its source range — or cut something Excel keeps whole: an array formula, a data table, or a table (all of it, its header or totals row, every data row, or columns inserted inside it). Nothing is written; the file is left as it was. Also thrown for an operation that is not an insert or delete of whole rows or columns.
|
|
373
|
+
- **Likely cause:** the grid's store refuses these first (SP-3022 to SP-3025); a host calling `patchXlsx` directly, or a table the store could not see, reaches this.
|
|
374
|
+
- **Fix:** insert or delete elsewhere — below a pivot's source, outside the table — or change the pivot or the table in Excel first.
|
|
375
|
+
|
|
322
376
|
### SP-2101
|
|
323
377
|
|
|
324
378
|
**download() needs a file name** · error · [SR-DOWNLOAD](../records/0101_DOWNLOAD.md) · `TypeError`
|
|
@@ -501,6 +555,110 @@ The store, the plugin host and `<sheetpane-excel>`.
|
|
|
501
555
|
- **Likely cause:** a 404 or 403; a cross-origin URL without CORS; invalid base64.
|
|
502
556
|
- **Fix:** check the URL opens in the browser and is same-origin or CORS-enabled.
|
|
503
557
|
|
|
558
|
+
### SP-3016
|
|
559
|
+
|
|
560
|
+
**Error meta dropped** · warning · [SR-GRID](../records/0105_GRID.md) decision 5b
|
|
561
|
+
|
|
562
|
+
- **Meaning:** an error's `meta` (W-68) was not kept: it is not JSON (a cycle, a BigInt, a function on its own), or its JSON text is over 64 KiB (`ERROR_META_MAX`). The error itself is kept, without it; `updateError` leaves the error's own `meta` as it was.
|
|
563
|
+
- **Likely cause:** an image's pixels, a whole PDF page or a DOM node put in `meta`.
|
|
564
|
+
- **Fix:** keep a reference in `meta` — a page number, a box, an id the host resolves — and draw the picture in `renderDetail`.
|
|
565
|
+
|
|
566
|
+
### SP-3017
|
|
567
|
+
|
|
568
|
+
**renderDetail failed** · error · [SR-ERRORS](../records/0106_ERRORS.md) decision 13
|
|
569
|
+
|
|
570
|
+
- **Meaning:** the host's `renderDetail` threw for an error; nothing is shown in that card or row, and the rest of it works.
|
|
571
|
+
- **Likely cause:** a bug in the host's hook, or an error whose `meta` it did not expect (an older review, an error without one).
|
|
572
|
+
- **Fix:** read the error logged after this line; make the hook return `null` when it has nothing to show.
|
|
573
|
+
|
|
574
|
+
### SP-3018
|
|
575
|
+
|
|
576
|
+
**Error not accepted** · warning · [SR-GRID](../records/0105_GRID.md) decision 5c
|
|
577
|
+
|
|
578
|
+
- **Meaning:** an acceptance (W-69) did not stand. `acceptError` or `updateError(id, { status: 'accepted' })` changed nothing; or `setErrors` restored an `accepted` error as `open`.
|
|
579
|
+
- **Likely cause:** no reason was given, or only spaces; or the error is the workbook's own (author `workbook` or `file` — a validation rule or a file comment), which is not accepted this way.
|
|
580
|
+
- **Fix:** pass the reason the deviation was approved, e.g. `acceptError(id, 'Approved by the customer on 18 Oct', { by: 'Ravi' })`; keep `reason` when saving a review.
|
|
581
|
+
|
|
582
|
+
### SP-3019
|
|
583
|
+
|
|
584
|
+
**Cell to open at not found** · warning · [SR-GRID](../records/0105_GRID.md) decision 11d
|
|
585
|
+
|
|
586
|
+
- **Meaning:** the `ref` attribute, or the `#sheetpane=` link in the URL (`link="hash"`), names no cell of this workbook; the sheet opens where it would have (a bad link falls back to `ref`, a bad `ref` to A1).
|
|
587
|
+
- **Likely cause:** a typo (`B` or `4B` is not a cell), a sheet name the file does not have (names match exactly, case included), or a link saved for another file.
|
|
588
|
+
- **Fix:** write a cell or range as `B4`, `Data!B4` or `'Q3 data'!B4:D8`, and check the sheet's name in its tab.
|
|
589
|
+
|
|
590
|
+
### SP-3020
|
|
591
|
+
|
|
592
|
+
**Nothing to check** · error · [SR-GRID](../records/0105_GRID.md) decision 22f · `TypeError`
|
|
593
|
+
|
|
594
|
+
- **Meaning:** `check()` from `@sheetpane/grid/check` (or `@sheetpane/validation/check`) was given something that is not a file's bytes.
|
|
595
|
+
- **Likely cause:** a path or a parsed workbook passed instead of the bytes; an unresolved promise (`readFile` without `await`).
|
|
596
|
+
- **Fix:** pass the bytes — `await readFile(path)` in Node, a `File` or `Blob` in a page — and the file's `name` in the options.
|
|
597
|
+
|
|
598
|
+
### SP-3021
|
|
599
|
+
|
|
600
|
+
**Layer name not valid** · warning · [SR-GRID](../records/0105_GRID.md) decision 5d
|
|
601
|
+
|
|
602
|
+
- **Meaning:** a review layer (W-51) was named with something that is not a name: not a string, empty, over 64 characters, or holding a space. `setErrors(list, { layer })`, `getErrors({ layer })` and the `layers` property change nothing; an error restored or written with such a `layer` goes into `review`.
|
|
603
|
+
- **Likely cause:** a display label used as the name (`'PDF check'`), or a layer read from a file that was never set.
|
|
604
|
+
- **Fix:** name layers with short ids — `validation`, `pdf` — and give `<sheetpane-errors>` the words to show in `layerNames` (`{ pdf: 'PDF check' }`).
|
|
605
|
+
|
|
606
|
+
### SP-3022
|
|
607
|
+
|
|
608
|
+
**Delete would split a merged range** · warning · [SR-GRID](../records/0105_GRID.md) decision 21d
|
|
609
|
+
|
|
610
|
+
- **Meaning:** deleting these rows or columns would remove part of a merged range but not all of it; nothing is deleted. The menu item is greyed with this reason; `insertRows` and the other store methods return `false`.
|
|
611
|
+
- **Likely cause:** the selection crosses a merged block (a title row, a merged label).
|
|
612
|
+
- **Fix:** unmerge the range first, or delete every row (column) of it.
|
|
613
|
+
|
|
614
|
+
### SP-3023
|
|
615
|
+
|
|
616
|
+
**Insert or delete would move a pivot table** · warning · [SR-GRID](../records/0105_GRID.md) decision 21d
|
|
617
|
+
|
|
618
|
+
- **Meaning:** the operation would move a pivot table on this sheet, or the worksheet range a pivot table summarises; sheetpane does not rewrite pivots, so nothing changes.
|
|
619
|
+
- **Likely cause:** rows or columns inserted or deleted above, left of, or inside a pivot table or its source.
|
|
620
|
+
- **Fix:** insert or delete below and right of them, or change the pivot in Excel.
|
|
621
|
+
|
|
622
|
+
### SP-3024
|
|
623
|
+
|
|
624
|
+
**Insert would push cells off the sheet** · warning · [SR-GRID](../records/0105_GRID.md) decision 21d
|
|
625
|
+
|
|
626
|
+
- **Meaning:** the sheet already uses its last row (1,048,576) or column (XFD) — inserting would push those cells off the end; nothing is inserted, as Excel refuses.
|
|
627
|
+
- **Likely cause:** a value or formula at the sheet's edge.
|
|
628
|
+
- **Fix:** clear the cells at the edge first.
|
|
629
|
+
|
|
630
|
+
### SP-3025
|
|
631
|
+
|
|
632
|
+
**Insert or delete would cut a table** · warning · [SR-GRID](../records/0105_GRID.md) decision 21d
|
|
633
|
+
|
|
634
|
+
- **Meaning:** an Excel table cannot follow the operation — it would delete all of the table, its header or totals row, or every data row, or insert columns inside it; nothing changes.
|
|
635
|
+
- **Likely cause:** whole rows or columns selected across a table's edge.
|
|
636
|
+
- **Fix:** delete body rows or whole columns of the table, or change the table in Excel. The tables are the ones `@sheetpane/import` reads (W-61); a host calling `restructureWorkbook` or `patchXlsx` directly meets SP-2016 instead.
|
|
637
|
+
|
|
638
|
+
### SP-3026
|
|
639
|
+
|
|
640
|
+
**Locked in the file** · warning · [SR-GRID](../records/0105_GRID.md) decision 21e
|
|
641
|
+
|
|
642
|
+
- **Meaning:** an edit — typing, paste, Delete — was refused because the cell is locked on a protected sheet. `sheetpane-editcancel` carries `{ reason: 'locked', code: 'SP-3026', message: 'Locked in the file' }` and nothing is stored. Inserting or deleting rows or columns is refused with the same code when the workbook's structure is protected, or the sheet is protected without that permission (*Insert rows*, *Delete columns*, …): the menu item is greyed with the reason, `insertRows` and the other store methods return `false` (SR-GRID decision 21d).
|
|
643
|
+
- **Likely cause:** the file's sheet is protected (Excel: Review › Protect Sheet) and the cell's format is *Locked* — Excel's default for every cell until it is unlocked; for an insert or delete, Protect Workbook (structure) or a sheet protected with *Insert rows* / *Delete rows* / *Insert columns* / *Delete columns* left unticked.
|
|
644
|
+
- **Fix:** edit the cells the file leaves unlocked; or unlock the cells (Format Cells › Protection) or unprotect the sheet in Excel and open the file again. A host that rules otherwise sets `protection="ignore"` on `<sheetpane-excel>` — its own decision. sheetpane never checks or removes a protection password.
|
|
645
|
+
|
|
646
|
+
### SP-3027
|
|
647
|
+
|
|
648
|
+
**Nothing to render** · error · [SR-GRID](../records/0105_GRID.md) decision 22g · `TypeError`
|
|
649
|
+
|
|
650
|
+
- **Meaning:** `renderStatic()` from `@sheetpane/grid/static` was given something that is not a loaded workbook.
|
|
651
|
+
- **Likely cause:** the file's bytes or a parsed workbook passed instead of a store; a store whose `load()` has not finished or was refused.
|
|
652
|
+
- **Fix:** pass `await loadWorkbook(bytes, { name, plugins })`, or a store after `await store.load(…)` with `getSnapshot().load.status === 'ready'`.
|
|
653
|
+
|
|
654
|
+
### SP-3028
|
|
655
|
+
|
|
656
|
+
**Cannot render that range** · error · [SR-GRID](../records/0105_GRID.md) decision 22g · `RangeError`
|
|
657
|
+
|
|
658
|
+
- **Meaning:** `renderStatic()` was asked for a sheet the workbook does not hold, a range that is not A1, or more than 200,000 cells.
|
|
659
|
+
- **Likely cause:** a sheet name spelt differently; `range: 'Sheet1!A1:C3'` (the sheet goes in `sheet`); a whole-column range on a large sheet.
|
|
660
|
+
- **Fix:** name the sheet as the workbook does, give `range` as `A1:F20`, and render the part of the sheet a reader needs.
|
|
661
|
+
|
|
504
662
|
---
|
|
505
663
|
|
|
506
664
|
## 4xxx · the errors element
|
|
@@ -511,6 +669,46 @@ The store, the plugin host and `<sheetpane-excel>`.
|
|
|
511
669
|
|
|
512
670
|
## 5xxx · plugins
|
|
513
671
|
|
|
672
|
+
### SP-5001
|
|
673
|
+
|
|
674
|
+
**Review sheet not written** · error · [SR-REVIEW](../records/0123_REVIEW.md) decision 9
|
|
675
|
+
|
|
676
|
+
- **Meaning:** the workbook part could not be read or extended, so no Review sheet was added; the export goes on, with any fills already written. `lastExport.sheet` is `undefined`.
|
|
677
|
+
- **Likely cause:** a damaged `xl/workbook.xml`, or one with no `<sheets>`.
|
|
678
|
+
- **Fix:** read the error logged after this line; re-save the workbook in Excel and export again.
|
|
679
|
+
|
|
680
|
+
### SP-5002
|
|
681
|
+
|
|
682
|
+
**Flagged cells not coloured on a sheet** · error · [SR-REVIEW](../records/0123_REVIEW.md) decision 9
|
|
683
|
+
|
|
684
|
+
- **Meaning:** a sheet part (or the styles part) could not be read, so that sheet's flagged cells were left exactly as they were. Each error is in `lastExport.skipped` with `reason: 'unreadable-part'` and this code.
|
|
685
|
+
- **Likely cause:** a sheet part with no `<sheetData>`, a chart sheet, or a damaged part.
|
|
686
|
+
- **Fix:** read the error logged after this line; the Review sheet still lists the errors.
|
|
687
|
+
|
|
688
|
+
### SP-5003
|
|
689
|
+
|
|
690
|
+
**Range too large to colour whole** · note · [SR-REVIEW](../records/0123_REVIEW.md) decision 9
|
|
691
|
+
|
|
692
|
+
- **Meaning:** an error's range covers more than 10,000 cells (`MAX_FILL_CELLS`), so only the cells the file already has inside it were coloured; no empty cells were added. It is in `lastExport.skipped` with `reason: 'range-capped'` and this code, and in `filled`.
|
|
693
|
+
- **Likely cause:** an error raised on whole columns or a very large block.
|
|
694
|
+
- **Fix:** nothing to fix; narrow the error's range if every cell should be coloured.
|
|
695
|
+
|
|
696
|
+
### SP-5004
|
|
697
|
+
|
|
698
|
+
**No styles part to colour cells** · note · [SR-REVIEW](../records/0123_REVIEW.md) decision 9
|
|
699
|
+
|
|
700
|
+
- **Meaning:** the file has no readable styles part, so no cell was coloured; the Review sheet is still written, with an unstyled header. Each error is in `lastExport.skipped` with `reason: 'no-styles'` and this code.
|
|
701
|
+
- **Likely cause:** a minimal workbook written by a script.
|
|
702
|
+
- **Fix:** re-save the workbook in Excel, which adds the part.
|
|
703
|
+
|
|
704
|
+
### SP-5005
|
|
705
|
+
|
|
706
|
+
**Review fill is not a colour** · error · [SR-REVIEW](../records/0123_REVIEW.md) decision 8 · `TypeError`
|
|
707
|
+
|
|
708
|
+
- **Meaning:** `review({ fills })` was given a value that is not a hex colour; the plugin is not created.
|
|
709
|
+
- **Likely cause:** a colour name (`'red'`) or a short hex (`'#f00'`).
|
|
710
|
+
- **Fix:** pass `#RRGGBB`, `RRGGBB` or ARGB `AARRGGBB`, or `null` to colour none.
|
|
711
|
+
|
|
514
712
|
### SP-5101
|
|
515
713
|
|
|
516
714
|
**Selection too large to format** · warning · [SR-NUMFMT](../records/0109_NUMFMT.md)
|
|
@@ -551,6 +749,62 @@ The store, the plugin host and `<sheetpane-excel>`.
|
|
|
551
749
|
- **Likely cause:** the `.wasm` file is not served, a wrong `wasm` option, or a CSP blocking WebAssembly.
|
|
552
750
|
- **Fix:** serve the engine's `.wasm`, pass its URL as `wasm`, and allow `wasm-unsafe-eval` in the CSP.
|
|
553
751
|
|
|
752
|
+
### SP-5401
|
|
753
|
+
|
|
754
|
+
**Rule check Excel validation cannot hold** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
755
|
+
|
|
756
|
+
- **Meaning:** writing the host's rules into the download (`rulesAsValidation`, W-58), a rule uses a check Excel's data validation has none of; the rule is not written and stays checked in sheetpane.
|
|
757
|
+
- **Likely cause:** the rule has a `pattern` (no regular expressions in Excel), a `noneOf` list, or `unique`.
|
|
758
|
+
- **Fix:** nothing to do for sheetpane. For Excel, add a `custom` rule by hand (`COUNTIF` for unique), or split the rule so its other checks are written.
|
|
759
|
+
|
|
760
|
+
### SP-5402
|
|
761
|
+
|
|
762
|
+
**Rule checks one Excel rule cannot combine** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
763
|
+
|
|
764
|
+
- **Meaning:** a rule holds two checks — a list with `min` or `max`, a number with a length, `equals` with `oneOf`, a list whose values do not fit its `type` — and one Excel rule holds one; it is not written.
|
|
765
|
+
- **Likely cause:** a rule that asks for more than one thing.
|
|
766
|
+
- **Fix:** keep the check Excel users need most in the rule for that column, and move the other to a cell rule or leave it to sheetpane.
|
|
767
|
+
|
|
768
|
+
### SP-5403
|
|
769
|
+
|
|
770
|
+
**List Excel cannot type out** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
771
|
+
|
|
772
|
+
- **Meaning:** a `oneOf` (or `equals`) list cannot be written as Excel's typed-out list, so it is not written.
|
|
773
|
+
- **Likely cause:** a value holds a comma (Excel splits the list on commas), the list is empty, or it is longer than 255 characters.
|
|
774
|
+
- **Fix:** shorten the list, or drop the commas from its values. A long list belongs on a sheet, with a list rule pointing at its range, written in the workbook itself.
|
|
775
|
+
|
|
776
|
+
### SP-5404
|
|
777
|
+
|
|
778
|
+
**Rule bound Excel cannot read** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
779
|
+
|
|
780
|
+
- **Meaning:** a rule's `min`, `max`, `minLength` or `maxLength` cannot be written as an Excel operand; the rule is not written.
|
|
781
|
+
- **Likely cause:** a number bound that is not a number, a date bound not written as `2026-01-31` or a serial, a length that is not a whole number from 0, or a lower bound above the upper.
|
|
782
|
+
- **Fix:** write the bound as a number, an ISO date (`2026-01-31`) or a date serial.
|
|
783
|
+
|
|
784
|
+
### SP-5405
|
|
785
|
+
|
|
786
|
+
**No column or sheet for a rule to write** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
787
|
+
|
|
788
|
+
- **Meaning:** a rule names a column title no sheet has in its title row, or a sheet the workbook lacks; it is not written.
|
|
789
|
+
- **Likely cause:** a renamed or misspelt column title or sheet name, or a `headerRow` that points at the wrong row. The rules engine says the same with SP-6022 or SP-6023.
|
|
790
|
+
- **Fix:** correct the title, the sheet name or `headerRow` in the rules file.
|
|
791
|
+
|
|
792
|
+
### SP-5406
|
|
793
|
+
|
|
794
|
+
**Cells keep the rule they already have** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
795
|
+
|
|
796
|
+
- **Meaning:** a rule written into the download reaches cells that already hold a different rule — the workbook's own data validation, which always wins, or a stronger rule from the rules file (a cell rule over a column rule, a named sheet's over `"*"`'s). Excel holds one rule per cell, so the written rule leaves those cells. A rule that checks the same thing as the workbook's own joins it instead, and is not reported.
|
|
797
|
+
- **Likely cause:** the workbook was saved with its own rule on the column, or a cell rule sits inside a ruled column.
|
|
798
|
+
- **Fix:** nothing, if the workbook's own rule is the one wanted; otherwise remove it from the workbook, or make the two rules agree.
|
|
799
|
+
|
|
800
|
+
### SP-5407
|
|
801
|
+
|
|
802
|
+
**Sheet rules could not be rewritten** · warning · [SR-VALIDATION](../records/0108_VALIDATION.md)
|
|
803
|
+
|
|
804
|
+
- **Meaning:** a sheet's own `<dataValidations>` could not be rewritten with the host's rules added, so that sheet keeps its block as it was and none of the host's rules are written to it.
|
|
805
|
+
- **Likely cause:** the sheet's own rules include one `@sheetpane/export` refuses to write (SP-2015: an unknown type, a title over 32 characters, an `sqref` like `B:B`), or the sheet has no worksheet part.
|
|
806
|
+
- **Fix:** resave the workbook in Excel so its rules are in Excel's own form, or correct the rule the message names.
|
|
807
|
+
|
|
554
808
|
### SP-5701
|
|
555
809
|
|
|
556
810
|
**Chart part is not well-formed XML** · error · [SR-CHARTS](../records/0113_CHARTS.md)
|
|
@@ -591,6 +845,21 @@ The store, the plugin host and `<sheetpane-excel>`.
|
|
|
591
845
|
- **Likely cause:** SP-5801 or SP-5802 on that sheet, or an unexpected part.
|
|
592
846
|
- **Fix:** read the error logged after this line; the export report lists the skipped ids.
|
|
593
847
|
|
|
848
|
+
### SP-5804
|
|
849
|
+
|
|
850
|
+
**Error with no cell not written as a comment** · note · [SR-COMMENTS](../records/0112_COMMENTS.md) decision 3
|
|
851
|
+
|
|
852
|
+
- **Meaning:** an error about a whole sheet (`range: ""`) or the whole workbook (`sheet: ""`, W-55) is not written as an Excel comment — a comment needs a cell, and sheetpane never puts it on A1. It is listed in `lastExport.skipped` with `reason: 'no-cell'` and this code.
|
|
853
|
+
- **Likely cause:** the host or a rule raised a sheet- or workbook-level finding ("no Pages List", "a listed tab has no sheet").
|
|
854
|
+
- **Fix:** nothing to fix; the error stays in the review. To carry it in the file, add `@sheetpane/review`, which lists it on a Review sheet of its own.
|
|
855
|
+
### SP-5901
|
|
856
|
+
|
|
857
|
+
**Compare key is not a column** · error · [SR-COMPARE](../records/0124_COMPARE.md)
|
|
858
|
+
|
|
859
|
+
- **Meaning:** `diffWorkbooks` was given a key for one sheet that is not a column of both versions, so it cannot tell which rows are the same row.
|
|
860
|
+
- **Likely cause:** a header title spelled differently, a key column renamed or deleted in one version, or a `headerRow` that is not the row with the titles.
|
|
861
|
+
- **Fix:** name the key by its title in the header row (or by its column letter) as both versions have it; a key given for every sheet (a string, a list or `'*'`) is used only where it exists.
|
|
862
|
+
|
|
594
863
|
---
|
|
595
864
|
|
|
596
865
|
## 6xxx · column rules and the rules file
|