Excel CLI (excel)

Use this page for Excel (.xlsx) command reference.

Commands at a glance

Command Purpose
clippit excel verify Validate package/schema/relationships
clippit excel to-html Convert workbook range/sheet/table to HTML/CSS
clippit excel create Generate an XLSX workbook from a JSON definition

All commands support --format json|text and --quiet.

excel verify

Validate readability and Open XML structure of a spreadsheet.

clippit excel verify <input.xlsx|-> [--office-version <version>] [--format json|text] [--quiet]
Option Description
--office-version Open XML schema version (default: Microsoft365).

Readable-but-invalid spreadsheets return verify JSON and exit code 4.

clippit excel verify spreadsheet.xlsx --format json
{"input":"/work/spreadsheet.xlsx","officeVersion":"Microsoft365","valid":true,"diagnostics":[]}

excel to-html

Convert a worksheet, range, or defined table to HTML/CSS.

clippit excel to-html <input.xlsx|-> [--output <file.html|->] [--sheet <name>] [--range <A1:D10>] [--table <name>] [--page-title <text>] [--additional-css <css>] [--css-prefix <prefix>] [--no-fabricate-css] [--format json|text] [--quiet]
Option Description
--output, -o Output HTML path (default: <input>.html). Use - for stdout.
--sheet Sheet name. Defaults to first sheet if --range and --table are omitted.
--range Cell/range coordinates (for example A1:D10). Requires --sheet.
--table Defined Excel table name. Cannot be combined with --sheet or --range.
--page-title HTML <title> text.
--additional-css Extra CSS injected into generated <style>.
--css-prefix Prefix for generated CSS classes (default: pt-).
--no-fabricate-css Use inline styles instead of generated CSS classes.
clippit excel to-html spreadsheet.xlsx --sheet "Q3 Data" --range "B2:F15" --output sheet.html --format json
{"input":"/work/spreadsheet.xlsx","output":"/work/sheet.html","outputSize":18231}

excel create

Generate an .xlsx workbook from a JSON workbook definition.

clippit excel create <input.json|-> [--output <file.xlsx|->] [--force] [--format json|text] [--quiet]
Option Description
--output, -o Output XLSX path (default: <input>.xlsx). Use - for stdout.
--force Overwrite existing output file.

The input JSON must contain at least one worksheet. See the workbook definition schema in schemas/README.md.

clippit excel create workbook.json --output report.xlsx --format json
{"input":"/work/workbook.json","output":"/work/report.xlsx","outputSize":24576,"worksheetCount":2}