xlvane: XLSX workbooks
v1.3.4XLSX tools: inspect, read, diff and validate workbooks; write, edit and convert with --allow-write.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
inspect_workbook Inspect a workbook
Describes an XLSX file without changing it: sheets (including hidden ones), used ranges, detected header rows, column types with sample values, merged cells, example formulas, pictures and charts (position, chart types, title, series count), and warnings (macros, external links, damaged parts). Macros are never run and links are never followed. Use it before read_table to find the sheet and header row.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the first allowed directory or absolute inside an allowed directory. |
sheet | string | Describe only this sheet. |
read_table Read a sheet as rows
Reads a sheet as an array of row objects keyed by the header row (or by column letters with header: false). Dates are returned as ISO 8601 strings in UTC, error cells as their code (e.g. "#N/A"), formulas as their cached result. Returns at most 1000 rows per call; use offset to page through larger sheets (totalRows and truncated say whether more rows exist).
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the first allowed directory or absolute inside an allowed directory. |
header | Header row: "auto" (default) detects it, a 1-based row number, or false for no header (columns are named by letter). | |
limit | integer | Rows to return. Default 200. |
offset | integer | Rows to skip. Default 0. |
range | string | Only this A1 range, e.g. "A1:D100". |
sheet | string | Sheet name. Default: the first visible worksheet. |
diff Compare two workbooks
Compares two XLSX files cell by cell (values and formulas; formatting with styles: true). Sheets are matched by name. Use it to check the result of an edit.
| Parameter | Type | Description |
|---|---|---|
after * | string | File path, relative to the first allowed directory or absolute inside an allowed directory. |
before * | string | File path, relative to the first allowed directory or absolute inside an allowed directory. |
maxChanges | integer | Changes listed per sheet. Default 200; the summary always counts all of them. |
styles | boolean | Also compare cell formatting. Default false. |
validate Check a workbook and its columns
Reports read warnings of an XLSX file and, with columns, checks a table: each listed column must exist in the header row, its cells must not be empty unless optional is true, and must have the given type. Each problem names the cell. ok is false when problems were found (warnings count only with strict: true).
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the first allowed directory or absolute inside an allowed directory. |
columns | array | Column rules, matched to the header row by name. type defaults to "any". |
sheet | string | Sheet name. Default: the first visible worksheet. |
strict | boolean | Treat warnings as problems. Default false. |