| name | generate-workbook |
| description | Build Excel workpapers pack via openpyxl. Use when working papers Excel or workbook.
|
/generate-workbook
Purpose
Single-pass Excel working papers for human review and client packs.
Uses openpyxl (Python). Does not require Microsoft Excel to generate.
Formulas are written as strings — values appear when the file is opened/recalculated.
See shared/excel_deliverables.md.
Ledger SoR after finalisation: Beancount (export-beancount), not this xlsx.
Script
pip install openpyxl
python3 scripts/generate_workbook.py <input.json> <output.xlsx>
Expected sheets (minimum)
- Company Info
- Chart of Accounts
- Bank Transactions
- Payroll Summary
- Fixed Asset Register
- Journal Entries
- General Ledger
- Trial Balance
- Income Statement
- Balance Sheet
- Tax Computation
- Queries & Notes
Process
- Assemble classified data + ATB + YE JEs into the script’s input JSON format.
- Run the generator.
- Verify file opens; spot-check TB/BS.
- Machine truth remains in
workpapers/*.json — do not invent numbers in Excel only.
PDF
Optional: scripts/generate_pdf_report.py (reads xlsx via openpyxl, needs reportlab).
Completion
Done when: workbook opens without corruption and key sheets tie to JSON workpapers/TB.