How to generate a monthly Excel report from a prompt
Wann einsetzen: Every month-end when you refresh 'the spreadsheet everyone asks for'.
Voraussetzungen
- 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
Ablauf
-
Create the workbookCreate /reports/2026-04.xlsx with tabs 'Summary', 'Revenue', 'Costs', 'Charts'.✓ Kopiert→ File created, sheets exist
-
Populate dataFill 'Revenue' from /data/apr-revenue.csv; add a total row with SUM formulas.✓ Kopiert→ Rows + totals present
-
Add chartsOn 'Charts' tab add a line chart of daily revenue from 'Revenue' A2:B31 titled 'April Revenue'.✓ Kopiert→ Chart visible on open in Excel
-
FormatOn 'Summary', bold headers, apply thousands separators to currency, and conditional-format any red (negative) values.✓ Kopiert→ Professionally formatted file
Ergebnis: A reviewer-ready .xlsx with live formulas and charts.
Fallstricke
- 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