xlvane 1.0.1 → 1.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/README.md +4 -4
- package/dist/cli.js +331 -12
- package/dist/index.d.ts +6 -7
- package/dist/index.js +3 -3
- package/dist/{node-files-uazELnqk.js → node-files-B0iqSJIJ.js} +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +3 -3
- package/dist/{options-B7UhudO_.js → options-CwSp2pA4.js} +87 -12
- package/dist/{rows-Cwte1t8m.js → rows-DKwlr0rg.js} +222 -75
- package/dist/{stream-write-CTgWff2P.js → stream-write-BKppyMz0.js} +9 -2
- package/dist/{stream-write-Q-sef804.d.ts → stream-write-GJXORYQ2.d.ts} +37 -7
- package/docs/cli-json/inspect.schema.json +8 -0
- package/docs/errors.md +1 -1
- package/docs/exceljs-compat.md +2 -2
- package/docs/inspect-json.md +2 -0
- package/llms-full.txt +19 -9
- package/package.json +1 -1
- package/skills/xlvane/SKILL.md +1 -1
package/docs/exceljs-compat.md
CHANGED
|
@@ -47,7 +47,7 @@ Status: **supported** means the same behaviour as exceljs for the cases covered
|
|
|
47
47
|
|
|
48
48
|
| API | Status | Notes | Source in exceljs |
|
|
49
49
|
|---|---|---|---|
|
|
50
|
-
| `name`, `id`, `state` | partly | Ids are given as in exceljs (the first free id),
|
|
50
|
+
| `name`, `id`, `state` | partly | Ids are given as in exceljs (the first free id), written as `sheetId` and kept on loading and by the `model` setter, as exceljs does, so `getWorksheet(id)` finds the same sheet after removing a sheet, writing and loading (D-F03). Differences: an id outside 1 to 65534, the range Office uses (W2-20), is written as the lowest unused `sheetId`; a file's missing, repeated or larger than 65534 `sheetId` gives the worksheet the lowest free id (exceljs reads `NaN`, lets the later sheet replace the earlier one, or uses the large number as an array index); the streaming `WorkbookReader` numbers worksheets 1, 2, 3… in file order, where exceljs uses the number N of the part `xl/worksheets/sheetN.xml` (`lib/stream/xlsx/workbook-reader.js` L107-109, L293-297). | `lib/doc/worksheet.js` L33; `lib/doc/workbook.js` L43–51; `lib/xlsx/xform/book/sheet-xform.js` L7, L18 |
|
|
51
51
|
| `columns` (get / set `{ header, key, width, style }`) | supported | As in exceljs, a column exists for every column a cell was created in, also after `addRow` and on a loaded file without `<cols>`, so `columns.forEach(c => { c.eachCell(…); c.width = … })` works; columns without width, style, hidden flag or outline level are not written (D-R09). An empty sheet gives `[]` where exceljs gives `null`. | `lib/doc/worksheet.js` L203, L209, L243–261; `lib/doc/row.js` L48 |
|
|
52
52
|
| `getColumn(key \| letter \| number)` | supported | | `lib/doc/worksheet.js` L243 |
|
|
53
53
|
| `addRow(values \| object, style?)`, `addRows` | supported | Style `'i'` / `'i+'` copies the style of the row above, as in exceljs. | `lib/doc/worksheet.js` L406, L414 |
|
|
@@ -58,7 +58,7 @@ Status: **supported** means the same behaviour as exceljs for the cases covered
|
|
|
58
58
|
| `rowCount`, `actualRowCount`, `columnCount` | supported | | `lib/doc/worksheet.js` L374, L378, L313 |
|
|
59
59
|
| `mergeCells(range \| t, l, b, r)`, `unMergeCells` | supported | | `lib/doc/worksheet.js` L602, L656 |
|
|
60
60
|
| `mergeCellsWithoutStyle(...)`, `findRows(start, length)`, `lastColumn`, `fillFormula(range, formula, results, shareType)`, `model` (get / set), `destroy()` | supported | `fillFormula` writes the formula into the top-left cell and `{ sharedFormula }` (or the same array formula) into the others, with results from a function, a flat array or a 2-D array, as in exceljs (X4-29). `findRows` returns `_rows.slice(start - 1, start - 1 + length)` as exceljs does (D-E06). `model` is xlvane's own plain snapshot (see `workbook.model`). | `lib/doc/worksheet.js` L181, L309, L370, L607, L678–721, L842–903 |
|
|
61
|
-
| `views` | partly | The first view is written: frozen panes, split panes (`xSplit`/`ySplit` in 1/20 point), `zoomScale` (10–400), `zoomScaleNormal`, `showGridLines`, `showRowColHeaders`, `showRuler`, `rightToLeft`, `style` (`pageBreakPreview`, `pageLayout`), `activeCell`, and `topLeftCell` of a normal view (X4-28). Differences: further views are not written, because xlvane's core writes one `sheetView` per worksheet; `workbookViewId` is always 0; frozen panes get the cell right of and below the panes as `topLeftCell
|
|
61
|
+
| `views` | partly | The first view is written: frozen panes, split panes (`xSplit`/`ySplit` in 1/20 point), `zoomScale` (10–400), `zoomScaleNormal`, `showGridLines`, `showRowColHeaders`, `showRuler`, `rightToLeft`, `style` (`pageBreakPreview`, `pageLayout`), `activeCell`, and `topLeftCell` of a normal view (X4-28). Differences: further views are not written, because xlvane's core writes one `sheetView` per worksheet; `workbookViewId` is always 0; frozen panes always get the cell right of and below the panes as `topLeftCell` (exceljs writes a frozen view's own `topLeftCell` when given, sheet-view-xform.js L50-53); a split view's `topLeftCell` is written as `pane@topLeftCell` and read back, as in exceljs (L72-85, L118-124; D-F02), and its `activeCell` is written and read back as the selection of the active pane; `activePane` is the pane the split implies; `tabSelected` is written for the first visible worksheet, whatever the view says. Every worksheet reads back with one view shaped as exceljs reads it. | `lib/doc/worksheet.js` L114; `lib/xlsx/xform/sheet/sheet-view-xform.js`; `index.d.ts` L33–149 |
|
|
62
62
|
| `autoFilter` (range string) | supported | | `lib/doc/worksheet.js` L116 |
|
|
63
63
|
| `insertRow(pos, values, style?)`, `insertRows(pos, values, style?)` | partly | Style options `n`, `i`, `i+`, `o`, `o+` as in exceljs. Built on `spliceRows`, so the differences below apply. | `lib/doc/worksheet.js` L422, L428, L444 |
|
|
64
64
|
| `spliceRows(start, count, ...inserts)` | partly | xlvane moves rows as a spreadsheet application does; exceljs 4.4.0 moves only values, styles and heights (X4-15). Differences: row objects keep their identity and their `number` follows them (exceljs copies values between row objects); the hidden flag, notes and links move with the row (exceljs leaves hidden/outline at the position and drops notes); merged ranges move, grow when rows are inserted inside them (inserted cells get a copy of the top-left cell's style, the other cells keep their own), shrink when rows are removed, and are dropped when their top-left cell is removed or one cell or nothing is left, as LibreOffice does (R-14; exceljs keeps stale ranges and dissolves merges on removal); the autofilter range moves and shrinks, and stops at the last row or column (exceljs leaves it); cells inserted inside a defined name join it (exceljs leaves a gap), and names follow whatever the case of their sheet name (exceljs compares it exactly); styles are copied, never shared; removing more rows than follow the removed block works (exceljs leaves rows behind). Formulas in every worksheet follow the splice as in a spreadsheet application (xlvane `adjustFormula`, D-B01; exceljs leaves them unchanged); formulas given in the inserted rows keep the text the caller wrote. If a formula cannot be adjusted safely, the call throws `XLV_E_NOT_SUPPORTED` before anything changes. | `lib/doc/worksheet.js` L483–548 |
|
package/docs/inspect-json.md
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
|---|---|---|
|
|
35
35
|
| `name` | string | sheet name |
|
|
36
36
|
| `index` | number | 0-based position |
|
|
37
|
+
| `sheetId` | number or `null` | the sheet's id in the file (`sheet@sheetId`), independent of its position; `null` when the file has none, an invalid one or a repeated one |
|
|
37
38
|
| `kind` | `"worksheet" \| "chartsheet" \| "dialogsheet" \| "macrosheet"` | only worksheets have cells |
|
|
38
39
|
| `state` | `"visible" \| "hidden" \| "veryHidden"` | visibility |
|
|
39
40
|
| `dimension` | string or `null` | range declared in the file, e.g. `"A1:D20"` |
|
|
@@ -112,6 +113,7 @@ Values in `samples` are JSON-safe: numbers, booleans, strings (cut to 100 charac
|
|
|
112
113
|
{
|
|
113
114
|
"name": "Sales",
|
|
114
115
|
"index": 0,
|
|
116
|
+
"sheetId": 1,
|
|
115
117
|
"kind": "worksheet",
|
|
116
118
|
"state": "visible",
|
|
117
119
|
"dimension": "A1:C3",
|
package/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# xlvane 1.0
|
|
1
|
+
# xlvane 1.1.0: documentation in one file
|
|
2
2
|
|
|
3
3
|
This file joins the README of the xlvane package, the Agent Skill and the documentation in docs/. It is generated by scripts/package-docs.mjs; the separate files are in the same package.
|
|
4
4
|
|
|
@@ -111,7 +111,7 @@ In Node.js, `writeWorkbookFile(workbook, 'sales.xlsx')` from `xlvane/node` write
|
|
|
111
111
|
- Values: numbers, strings, booleans, `Date`s (stored as serial numbers with a `yyyy-mm-dd` or `yyyy-mm-dd hh:mm:ss` format unless the style sets one), `{ error: '#N/A' }`, and `{ formula, result }`, also as an array formula (`{ formula, array: 'A1:A3' }`) or a shared formula (`{ formula, shared: 'B1:B9' }` on the first cell, `{ sharedFormula: 'B1' }` on the others). xlvane writes the formula text and the cached result you give; it does not calculate formulas.
|
|
112
112
|
- Styles: font (name, size, bold, italic, underline, strike, colour, superscript and subscript, family, scheme, charset, outline, shadow), fill (solid colour, pattern, or linear and path gradient), borders (top, right, bottom, left, diagonal), alignment (horizontal, vertical, wrap, shrink to fit, indent, rotation, reading order), cell protection (`locked`, `hidden`) and number format. Identical styles are stored once. `sheet.style(range, style)` merges a style into every cell of a range.
|
|
113
113
|
- Layout: column widths and hidden columns, row heights and hidden rows, outline levels of rows and columns (`row(n, { outlineLevel: 1, collapsed })`, `column('B', { outlineLevel: 1 })`), merged ranges, frozen rows and columns, autofilter, hidden and very hidden sheets. `sheet.properties({ defaultRowHeight, outlineLevelRow, outlineLevelCol, summaryBelow, summaryRight })` sets the sheet's format properties.
|
|
114
|
-
- Workbook: `workbook.views([{ x, y, width, height, firstSheet, activeTab, visibility }])` sets the workbook windows and `workbook.calculation({ fullCalcOnLoad: true })` asks applications to recalculate when the file is opened.
|
|
114
|
+
- Workbook: `workbook.views([{ x, y, width, height, firstSheet, activeTab, visibility }])` sets the workbook windows (`activeTab` and `firstSheet` are checked against the sheets when the workbook is written) and `workbook.calculation({ fullCalcOnLoad: true })` asks applications to recalculate when the file is opened. `addSheet(name, { sheetId })` sets the sheet's id in the file (1 to 65534, unique; other sheets get the lowest unused ids), and reading gives `sheet.sheetId`.
|
|
115
115
|
- Writer options: `writeWorkbook(workbook, { sharedStrings: false })` writes text inline instead of in a shared string table; `{ compressionLevel: 0 }` (0–9, default 6) stores or compresses the parts. The same options work for `writeWorkbookFile` and, with `compressionLevel`, `writeWorkbookStream`.
|
|
116
116
|
- Invalid input is rejected when it is set, with an `XlvError` saying what and where, for example `XLV_E_INVALID_SHEET_NAME` or `XLV_E_INVALID_STYLE` with the allowed values.
|
|
117
117
|
- The output is deterministic: the same workbook always gives the same bytes. The exception is a protection password (`protect({ password })`), whose verifier gets a random salt; pass a fixed salt through `hashPassword` for identical bytes. The test suite opens written files that use all of these features in LibreOffice and checks the values, styles and layout it sees.
|
|
@@ -157,7 +157,7 @@ console.log(read.hyperlinks, read.notes, read.cell('B2')?.note?.text, read.tabCo
|
|
|
157
157
|
|
|
158
158
|
- **Hyperlinks:** `link(range, { url | location, tooltip?, display? })`. A `url` (web page, `mailto:`, file) is stored as an external relationship of the sheet; a `location` (a place in the workbook) is stored without one. The cell text is set with `set`. Reading gives `sheet.hyperlinks` and `cell.hyperlink`; xlvane never opens a target, and `XLV_W_UNUSUAL_HYPERLINK` reports targets other than http(s) or mailto.
|
|
159
159
|
- **Notes (comments):** `note(cell, text | { text | runs, author?, box? })`; `box` sets the note box: `margins` in millimetres, `autoMargins`, `locked`, `lockText`, `anchor` (`'absolute'`, `'oneCell'`, `'twoCell'`); reading gives the same as `note.box`. The cell needs no value. Notes are written hidden, as spreadsheet applications show them when the pointer rests on the cell. Reading gives `sheet.notes` and `cell.note` (`text`, `author`, and `runs` for rich text). Threaded comments of current Excel versions are not read; their placeholder notes are, with `XLV_W_THREADED_COMMENTS`.
|
|
160
|
-
- **Tab colour and view:** `tabColor(color)`, and `view({ zoom, zoomScaleNormal, showGridLines, showRowColHeaders, showRuler, rightToLeft, layout, split, topLeftCell, activeCell })
|
|
160
|
+
- **Tab colour and view:** `tabColor(color)`, and `view({ zoom, zoomScaleNormal, showGridLines, showRowColHeaders, showRuler, rightToLeft, layout, split, topLeftCell, activeCell })`; a split window takes `split: { x, y, topLeftCell }` in points, where `topLeftCell` is the first cell shown in the bottom-right pane. Reading gives `sheet.tabColor`, `sheet.view`, `sheet.properties`, `workbook.views` and `workbook.calculation`.
|
|
161
161
|
- **Streaming:** `writeWorkbookStream` takes `hyperlinks` and `notes` per row (`{ values, hyperlinks: [...], notes: [...] }`, by column position) and `tabColor`/`view` per sheet. `openWorkbookStream` sets `cell.note` on the rows it returns and lists a sheet's notes with `notes(sheet)`; it does not set `cell.hyperlink`.
|
|
162
162
|
- `editCells` and `appendRows` keep existing links and notes but cannot add new ones yet.
|
|
163
163
|
|
|
@@ -299,10 +299,10 @@ const { bytes: shorter } = deleteRows(wider, { sheet: 'Orders', at: 10, count: 3
|
|
|
299
299
|
```
|
|
300
300
|
|
|
301
301
|
- Like `editCells`, they change an existing file in place and keep every other part as it was.
|
|
302
|
-
- References follow the rows as in a spreadsheet application: formulas on every sheet, merged cells, hyperlinks, notes, the autofilter, conditional formats, data validation, page breaks and defined names. A range grows when rows are inserted inside it and shrinks when some of its rows are deleted; a reference whose cells are all deleted becomes `#REF!`. The rules are in docs/facts/ref-adjust.md (observed in LibreOffice; not yet checked against Excel).
|
|
302
|
+
- References follow the rows as in a spreadsheet application: formulas on every sheet, merged cells, hyperlinks, notes, the autofilter, conditional formats (with their thresholds), data validation, page breaks and defined names. A range grows when rows are inserted inside it and shrinks when some of its rows are deleted; a reference whose cells are all deleted becomes `#REF!`. The rules are in docs/facts/ref-adjust.md (observed in LibreOffice; not yet checked against Excel).
|
|
303
303
|
- Tables move, grow and shrink with their rows; deleting a table's header row, totals row or all of its data rows is refused.
|
|
304
304
|
- Pictures move with their rows. Drawings with charts, shapes or form controls, a deletion that would cut a picture, parts xlvane cannot rewrite (charts or pivot tables that may refer to the sheet), and formulas xlvane cannot rewrite safely (for example 3-D references such as `Jan:Mar!A1` that include the sheet) are refused with `XLV_E_NOT_SUPPORTED`. Data that would be pushed past row 1048576 gives `XLV_E_LIMIT_EXCEEDED`.
|
|
305
|
-
-
|
|
305
|
+
- Conditional formats and data validations of the [MS-XLSX] extension (extended data bars, the icon sets `3Stars`, `3Triangles`, `5Boxes` and `NoIcons`, and rules written by Excel) move with the rows too, and so do thresholds that refer to cells (`{ type: 'formula', value: '$C$12' }`). Other extended content that refers to cells, such as sparklines or slicers, is refused.
|
|
306
306
|
- Sheet views (selection, frozen panes) are not changed.
|
|
307
307
|
- `adjustFormula` and `adjustRange` apply the same rules to formula text you hold yourself.
|
|
308
308
|
|
|
@@ -586,7 +586,7 @@ const { bytes: wider } = insertRows(bytes, { sheet: 'Sales', at: 5, count: 2, st
|
|
|
586
586
|
const { bytes: shorter } = deleteRows(wider, { sheet: 'Sales', at: 5, count: 2 });
|
|
587
587
|
```
|
|
588
588
|
|
|
589
|
-
Formulas on every sheet, merged cells, links, notes, conditional formats, data validation and defined names follow the rows; references to deleted cells become `#REF!`. Tables and pictures move with their rows. Drawings with charts or shapes, and a deletion that would cut a picture or remove a table's header row, totals row or all of its data rows, are refused with `XLV_E_NOT_SUPPORTED`.
|
|
589
|
+
Formulas on every sheet, merged cells, links, notes, conditional formats (also extended data bars and icon sets, and thresholds that refer to cells), data validation and defined names follow the rows; references to deleted cells become `#REF!`. Tables and pictures move with their rows. Drawings with charts or shapes, sparklines and slicers, and a deletion that would cut a picture or remove a table's header row, totals row or all of its data rows, are refused with `XLV_E_NOT_SUPPORTED`.
|
|
590
590
|
|
|
591
591
|
`inspect()` reports the same items (`properties`, `definedNames`, and per sheet `richTextCellCount`, `styledColumns`, `hyperlinkCount` and `noteCount`). A column style is a default for cells added later; xlvane does not apply it to cells you set.
|
|
592
592
|
|
|
@@ -887,7 +887,7 @@ The CSV text given to `fromCSV` has a quoted field that is never closed, text ri
|
|
|
887
887
|
`hashPassword` and `verifyPassword` throw it for a hash algorithm other than SHA-1, SHA-256, SHA-384 and SHA-512, and `hashPassword` without a `salt` throws it in a runtime that has no `crypto.getRandomValues` (pass your own random salt there; SR-50, D-C08).
|
|
888
888
|
`editCells` throws it for an array or shared formula in an edit (it writes plain formulas only), and for a cell inside an array formula's range or the master of a shared formula with other cells in its range (D-E02); `details.cell` names it.
|
|
889
889
|
`appendRows` throws it when a table ends with a totals row on the sheet's last used row (the new rows would fall below the totals row; the hint gives the `insertRows` call that grows the table instead), or when growing a table for the new rows would overlap another table (D-R03).
|
|
890
|
-
`insertRows` and `deleteRows` (and `xlvane edit --insert-rows` / `--delete-rows`) also throw it when the sheet has content whose cell references xlvane cannot move yet: tables, charts, shapes and other drawing objects (pictures alone are moved, and deleting rows that would cut a picture is refused), pivot tables, form controls, embedded objects, custom sheet views, threaded comments, extended content such as data
|
|
890
|
+
`insertRows` and `deleteRows` (and `xlvane edit --insert-rows` / `--delete-rows`) also throw it when the sheet has content whose cell references xlvane cannot move yet: tables, charts, shapes and other drawing objects (pictures alone are moved, and deleting rows that would cut a picture is refused), pivot tables, form controls, embedded objects, custom sheet views, threaded comments, extended content such as sparklines or slicers (the conditional formats and data validations of the [MS-XLSX] extension are moved, D-F04), a chart or pivot cache elsewhere that names the sheet, a data table, an array formula the change would split, or a formula or defined name that cannot be adjusted safely (for example a 3-D reference such as `Jan:Mar!A1` that includes the sheet, D-B01). The message names the part or the cell, and `details` gives the element, relationship type or formula.
|
|
891
891
|
**Fix:** for `@xlvane/compat`, see docs/exceljs-compat.md for the supported subset; remove the call, or keep using exceljs for files that need the feature.
|
|
892
892
|
For `insertRows`/`deleteRows`, insert or delete the rows in a spreadsheet application, or remove the named content first.
|
|
893
893
|
|
|
@@ -1007,6 +1007,7 @@ A worksheet contains a row whose number is not a whole number from 1 to 1048576,
|
|
|
1007
1007
|
|---|---|---|
|
|
1008
1008
|
| `name` | string | sheet name |
|
|
1009
1009
|
| `index` | number | 0-based position |
|
|
1010
|
+
| `sheetId` | number or `null` | the sheet's id in the file (`sheet@sheetId`), independent of its position; `null` when the file has none, an invalid one or a repeated one |
|
|
1010
1011
|
| `kind` | `"worksheet" \| "chartsheet" \| "dialogsheet" \| "macrosheet"` | only worksheets have cells |
|
|
1011
1012
|
| `state` | `"visible" \| "hidden" \| "veryHidden"` | visibility |
|
|
1012
1013
|
| `dimension` | string or `null` | range declared in the file, e.g. `"A1:D20"` |
|
|
@@ -1085,6 +1086,7 @@ Values in `samples` are JSON-safe: numbers, booleans, strings (cut to 100 charac
|
|
|
1085
1086
|
{
|
|
1086
1087
|
"name": "Sales",
|
|
1087
1088
|
"index": 0,
|
|
1089
|
+
"sheetId": 1,
|
|
1088
1090
|
"kind": "worksheet",
|
|
1089
1091
|
"state": "visible",
|
|
1090
1092
|
"dimension": "A1:C3",
|
|
@@ -1250,7 +1252,7 @@ Status: **supported** means the same behaviour as exceljs for the cases covered
|
|
|
1250
1252
|
|
|
1251
1253
|
| API | Status | Notes | Source in exceljs |
|
|
1252
1254
|
|---|---|---|---|
|
|
1253
|
-
| `name`, `id`, `state` | partly | Ids are given as in exceljs (the first free id),
|
|
1255
|
+
| `name`, `id`, `state` | partly | Ids are given as in exceljs (the first free id), written as `sheetId` and kept on loading and by the `model` setter, as exceljs does, so `getWorksheet(id)` finds the same sheet after removing a sheet, writing and loading (D-F03). Differences: an id outside 1 to 65534, the range Office uses (W2-20), is written as the lowest unused `sheetId`; a file's missing, repeated or larger than 65534 `sheetId` gives the worksheet the lowest free id (exceljs reads `NaN`, lets the later sheet replace the earlier one, or uses the large number as an array index); the streaming `WorkbookReader` numbers worksheets 1, 2, 3… in file order, where exceljs uses the number N of the part `xl/worksheets/sheetN.xml` (`lib/stream/xlsx/workbook-reader.js` L107-109, L293-297). | `lib/doc/worksheet.js` L33; `lib/doc/workbook.js` L43–51; `lib/xlsx/xform/book/sheet-xform.js` L7, L18 |
|
|
1254
1256
|
| `columns` (get / set `{ header, key, width, style }`) | supported | As in exceljs, a column exists for every column a cell was created in, also after `addRow` and on a loaded file without `<cols>`, so `columns.forEach(c => { c.eachCell(…); c.width = … })` works; columns without width, style, hidden flag or outline level are not written (D-R09). An empty sheet gives `[]` where exceljs gives `null`. | `lib/doc/worksheet.js` L203, L209, L243–261; `lib/doc/row.js` L48 |
|
|
1255
1257
|
| `getColumn(key \| letter \| number)` | supported | | `lib/doc/worksheet.js` L243 |
|
|
1256
1258
|
| `addRow(values \| object, style?)`, `addRows` | supported | Style `'i'` / `'i+'` copies the style of the row above, as in exceljs. | `lib/doc/worksheet.js` L406, L414 |
|
|
@@ -1261,7 +1263,7 @@ Status: **supported** means the same behaviour as exceljs for the cases covered
|
|
|
1261
1263
|
| `rowCount`, `actualRowCount`, `columnCount` | supported | | `lib/doc/worksheet.js` L374, L378, L313 |
|
|
1262
1264
|
| `mergeCells(range \| t, l, b, r)`, `unMergeCells` | supported | | `lib/doc/worksheet.js` L602, L656 |
|
|
1263
1265
|
| `mergeCellsWithoutStyle(...)`, `findRows(start, length)`, `lastColumn`, `fillFormula(range, formula, results, shareType)`, `model` (get / set), `destroy()` | supported | `fillFormula` writes the formula into the top-left cell and `{ sharedFormula }` (or the same array formula) into the others, with results from a function, a flat array or a 2-D array, as in exceljs (X4-29). `findRows` returns `_rows.slice(start - 1, start - 1 + length)` as exceljs does (D-E06). `model` is xlvane's own plain snapshot (see `workbook.model`). | `lib/doc/worksheet.js` L181, L309, L370, L607, L678–721, L842–903 |
|
|
1264
|
-
| `views` | partly | The first view is written: frozen panes, split panes (`xSplit`/`ySplit` in 1/20 point), `zoomScale` (10–400), `zoomScaleNormal`, `showGridLines`, `showRowColHeaders`, `showRuler`, `rightToLeft`, `style` (`pageBreakPreview`, `pageLayout`), `activeCell`, and `topLeftCell` of a normal view (X4-28). Differences: further views are not written, because xlvane's core writes one `sheetView` per worksheet; `workbookViewId` is always 0; frozen panes get the cell right of and below the panes as `topLeftCell
|
|
1266
|
+
| `views` | partly | The first view is written: frozen panes, split panes (`xSplit`/`ySplit` in 1/20 point), `zoomScale` (10–400), `zoomScaleNormal`, `showGridLines`, `showRowColHeaders`, `showRuler`, `rightToLeft`, `style` (`pageBreakPreview`, `pageLayout`), `activeCell`, and `topLeftCell` of a normal view (X4-28). Differences: further views are not written, because xlvane's core writes one `sheetView` per worksheet; `workbookViewId` is always 0; frozen panes always get the cell right of and below the panes as `topLeftCell` (exceljs writes a frozen view's own `topLeftCell` when given, sheet-view-xform.js L50-53); a split view's `topLeftCell` is written as `pane@topLeftCell` and read back, as in exceljs (L72-85, L118-124; D-F02), and its `activeCell` is written and read back as the selection of the active pane; `activePane` is the pane the split implies; `tabSelected` is written for the first visible worksheet, whatever the view says. Every worksheet reads back with one view shaped as exceljs reads it. | `lib/doc/worksheet.js` L114; `lib/xlsx/xform/sheet/sheet-view-xform.js`; `index.d.ts` L33–149 |
|
|
1265
1267
|
| `autoFilter` (range string) | supported | | `lib/doc/worksheet.js` L116 |
|
|
1266
1268
|
| `insertRow(pos, values, style?)`, `insertRows(pos, values, style?)` | partly | Style options `n`, `i`, `i+`, `o`, `o+` as in exceljs. Built on `spliceRows`, so the differences below apply. | `lib/doc/worksheet.js` L422, L428, L444 |
|
|
1267
1269
|
| `spliceRows(start, count, ...inserts)` | partly | xlvane moves rows as a spreadsheet application does; exceljs 4.4.0 moves only values, styles and heights (X4-15). Differences: row objects keep their identity and their `number` follows them (exceljs copies values between row objects); the hidden flag, notes and links move with the row (exceljs leaves hidden/outline at the position and drops notes); merged ranges move, grow when rows are inserted inside them (inserted cells get a copy of the top-left cell's style, the other cells keep their own), shrink when rows are removed, and are dropped when their top-left cell is removed or one cell or nothing is left, as LibreOffice does (R-14; exceljs keeps stale ranges and dissolves merges on removal); the autofilter range moves and shrinks, and stops at the last row or column (exceljs leaves it); cells inserted inside a defined name join it (exceljs leaves a gap), and names follow whatever the case of their sheet name (exceljs compares it exactly); styles are copied, never shared; removing more rows than follow the removed block works (exceljs leaves rows behind). Formulas in every worksheet follow the splice as in a spreadsheet application (xlvane `adjustFormula`, D-B01; exceljs leaves them unchanged); formulas given in the inserted rows keep the text the caller wrote. If a formula cannot be adjusted safely, the call throws `XLV_E_NOT_SUPPORTED` before anything changes. | `lib/doc/worksheet.js` L483–548 |
|
|
@@ -2205,6 +2207,13 @@ A workbook loaded with `xlsx.load()` is written again by `xlsx.writeBuffer()` (`
|
|
|
2205
2207
|
"type": "integer",
|
|
2206
2208
|
"minimum": 0
|
|
2207
2209
|
},
|
|
2210
|
+
"sheetId": {
|
|
2211
|
+
"type": [
|
|
2212
|
+
"integer",
|
|
2213
|
+
"null"
|
|
2214
|
+
],
|
|
2215
|
+
"minimum": 0
|
|
2216
|
+
},
|
|
2208
2217
|
"kind": {
|
|
2209
2218
|
"enum": [
|
|
2210
2219
|
"worksheet",
|
|
@@ -2555,6 +2564,7 @@ A workbook loaded with `xlsx.load()` is written again by `xlsx.writeBuffer()` (`
|
|
|
2555
2564
|
"required": [
|
|
2556
2565
|
"name",
|
|
2557
2566
|
"index",
|
|
2567
|
+
"sheetId",
|
|
2558
2568
|
"kind",
|
|
2559
2569
|
"state",
|
|
2560
2570
|
"dimension",
|
package/package.json
CHANGED
package/skills/xlvane/SKILL.md
CHANGED
|
@@ -167,7 +167,7 @@ const { bytes: wider } = insertRows(bytes, { sheet: 'Sales', at: 5, count: 2, st
|
|
|
167
167
|
const { bytes: shorter } = deleteRows(wider, { sheet: 'Sales', at: 5, count: 2 });
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
Formulas on every sheet, merged cells, links, notes, conditional formats, data validation and defined names follow the rows; references to deleted cells become `#REF!`. Tables and pictures move with their rows. Drawings with charts or shapes, and a deletion that would cut a picture or remove a table's header row, totals row or all of its data rows, are refused with `XLV_E_NOT_SUPPORTED`.
|
|
170
|
+
Formulas on every sheet, merged cells, links, notes, conditional formats (also extended data bars and icon sets, and thresholds that refer to cells), data validation and defined names follow the rows; references to deleted cells become `#REF!`. Tables and pictures move with their rows. Drawings with charts or shapes, sparklines and slicers, and a deletion that would cut a picture or remove a table's header row, totals row or all of its data rows, are refused with `XLV_E_NOT_SUPPORTED`.
|
|
171
171
|
|
|
172
172
|
`inspect()` reports the same items (`properties`, `definedNames`, and per sheet `richTextCellCount`, `styledColumns`, `hyperlinkCount` and `noteCount`). A column style is a default for cells added later; xlvane does not apply it to cells you set.
|
|
173
173
|
|