xlvane: XLSX workbooks

v1.3.4
io.github.DevXord/xlvane Checked 2 hours ago Published 21 days ago

XLSX 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.

ParameterTypeDescription
path *stringFile path, relative to the first allowed directory or absolute inside an allowed directory.
sheetstringDescribe 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).

ParameterTypeDescription
path *stringFile path, relative to the first allowed directory or absolute inside an allowed directory.
headerHeader row: "auto" (default) detects it, a 1-based row number, or false for no header (columns are named by letter).
limitintegerRows to return. Default 200.
offsetintegerRows to skip. Default 0.
rangestringOnly this A1 range, e.g. "A1:D100".
sheetstringSheet 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.

ParameterTypeDescription
after *stringFile path, relative to the first allowed directory or absolute inside an allowed directory.
before *stringFile path, relative to the first allowed directory or absolute inside an allowed directory.
maxChangesintegerChanges listed per sheet. Default 200; the summary always counts all of them.
stylesbooleanAlso 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).

ParameterTypeDescription
path *stringFile path, relative to the first allowed directory or absolute inside an allowed directory.
columnsarrayColumn rules, matched to the header row by name. type defaults to "any".
sheetstringSheet name. Default: the first visible worksheet.
strictbooleanTreat warnings as problems. Default false.