Spreadsheets
Use the deterministic workbook CLI and keep calculations editable inside the resulting XLSX. Never overwrite an input workbook.
Runtime
Prefer workspace dependency Python. Otherwise use Python 3:
On macOS/Linux use python3; on Windows PowerShell use py -3 (or the
workspace dependency loader's absolute python.exe path). On Windows set the
skill directory with $env:SKILL_DIR = '<skill-directory>'. Every python3
example below uses this platform-specific launcher substitution.
python3 "$SKILL_DIR/scripts/bootstrap.py" <command> [arguments]
py -3 "$env:SKILL_DIR\scripts\bootstrap.py" <command> [arguments]
Missing packages are installed from the hashed lock into ~/.wegent-executor/plugin-envs/wework-public/spreadsheets/, never globally.
Workflow
- Run
inspectbefore modifying an existing workbook. - For new workbooks, prepare a JSON specification from spec.md, then run
create. - Use formulas for auditable calculations. Use
set-cellfor focused changes andexport-csvfor interchange. - Run
validateafter every change. - Run
render --images, inspect all pages, and correct clipped columns, excessive pagination, or unreadable formatting.
Commands
python3 "$SKILL_DIR/scripts/bootstrap.py" inspect --input source.xlsx --output inspection.json
python3 "$SKILL_DIR/scripts/bootstrap.py" create --spec workbook.json --output result.xlsx
python3 "$SKILL_DIR/scripts/bootstrap.py" set-cell --input source.xlsx --sheet Summary --cell B2 --value-json '125' --output result.xlsx
python3 "$SKILL_DIR/scripts/bootstrap.py" set-cell --input source.xlsx --sheet Summary --cell C2 --formula 'SUM(A2:B2)' --output result.xlsx
python3 "$SKILL_DIR/scripts/bootstrap.py" export-csv --input result.xlsx --sheet Summary --output summary.csv
python3 "$SKILL_DIR/scripts/bootstrap.py" validate --input result.xlsx
python3 "$SKILL_DIR/scripts/bootstrap.py" render --input result.xlsx --output-dir rendered --images
Quality rules
- Store numbers, dates, booleans, and formulas as typed cell values rather than formatted strings.
- Use a styled header, readable column widths, freeze panes, and filters for non-trivial tables.
- Prefer formulas over hard-coded calculated outputs when users need an auditable model.
- Remember that the Python library does not calculate formulas; recalculate with Excel or LibreOffice when current values matter.
- Validate structure and visually review rendered output before delivery.