xlsx-reader
Converts every sheet in an .xlsx or .xls workbook into a Markdown table (first row = header) so that an LLM agent can read and reason over spreadsheet content without needing a binary parser.
When to use
- The user drops an Excel file of test cases, a requirements matrix, or a QA checklist into the conversation.
- A task requires reading structured tabular data from a
.xlsx/.xlssource (e.g. "import these test cases", "summarise this checklist"). - You need machine-readable rows from a spreadsheet before feeding them to another skill (e.g.
xray-testing,test-case-analysis).
Usage
node scripts/read_xlsx.js <input.xlsx> [output.md]
- Sheet → table — each sheet becomes an
## SheetNamesection followed by a GitHub-Flavoured Markdown table; the first row is used as the header row. - Stdout vs file — omit
output.mdto print the Markdown to stdout (pipe-friendly); supply a path to write to a file instead. - Missing package — if the
xlsxnpm package is not installed the script exits with a clear message:Install it with: npm i xlsx.
Notes
- After writing to a file, read the produced Markdown back with the
Readtool to bring the content into the agent's context. - For large workbooks with many sheets, convert only the relevant sheet by trimming the output (e.g. filtering on the
## <SheetName>headings) — avoid overwhelming the context window.