How to generate a monthly Excel report from a prompt
When to use: Every month-end when you refresh 'the spreadsheet everyone asks for'.
Prerequisites
- uv installed — curl -LsSf https://astral.sh/uv/install.sh | sh
- A source of truth (CSV, DB query, or prior month's file) — Export to CSV, or pair with postgres MCP
Flow
-
Create the workbookCreate /reports/2026-04.xlsx with tabs 'Summary', 'Revenue', 'Costs', 'Charts'.✓ Copied→ File created, sheets exist
-
Populate dataFill 'Revenue' from /data/apr-revenue.csv; add a total row with SUM formulas.✓ Copied→ Rows + totals present
-
Add chartsOn 'Charts' tab add a line chart of daily revenue from 'Revenue' A2:B31 titled 'April Revenue'.✓ Copied→ Chart visible on open in Excel
-
FormatOn 'Summary', bold headers, apply thousands separators to currency, and conditional-format any red (negative) values.✓ Copied→ Professionally formatted file
Outcome: A reviewer-ready .xlsx with live formulas and charts.
Pitfalls
- Pasting 100k rows via prompt blows the context window — Have the MCP read the CSV directly from disk rather than pasting values
- Pivot tables written by openpyxl don't auto-refresh on open in some Excel versions — Instruct users to right-click Refresh; or use a formula-based summary instead