What this prompt does
This prompt builds a Python Excel report generator for [report_type] reports aimed at [report_audience], generated [report_frequency] from [data_sources]. It covers the full cycle: a multi-sheet workbook structure, a pandas data pipeline, professional formatting, embedded charts, conditional formatting, a protected cover page, and automated email delivery. Because stakeholders judge these reports on polish, the prompt is deliberately specific about styles, number formats, and chart placement so the output looks hand-crafted, not dumped.
The variables control structure and presentation. [sheet_count] and [sheet_names] define the workbook layout with a Summary sheet aggregating the rest, while [excel_library] and [header_style] drive formatting including frozen panes and auto-filters. The pipeline runs [query_count] queries, computes [calculated_fields], and aggregates by [grouping_fields], with results cached during development to avoid re-fetching. [chart_count] and [chart_types] place embedded charts at explicit cells, [highlight_rules] and [outlier_threshold] add conditional formatting and color scales, and [recipients] with [email_method] and [retention_count] handle delivery and archiving so the manual step disappears entirely.
When to use it
- Automating a recurring Excel report a team currently rebuilds by hand each period.
- Producing a polished multi-sheet workbook with a Summary tab aggregating the rest.
- Pulling from
[data_sources]and shaping the data with a pandas pipeline. - Embedding charts and conditional formatting that stakeholders expect to look professional.
- Highlighting performance with rules like
[highlight_rules]and outlier detection. - Delivering the finished file by email to
[recipients]and archiving past copies automatically.
Example output
You get a report-generator implementation with code: a [sheet_count]-sheet workbook ([sheet_names]) with frozen panes, auto-filters, and an aggregating Summary sheet; a pandas pipeline running [query_count] queries against [data_sources], computing [calculated_fields], and grouping by [grouping_fields]; professional formatting via [excel_library] with [header_style] headers and proper number formats; [chart_count] embedded charts ([chart_types]) placed at specific cells; conditional formatting for [highlight_rules] and outliers beyond [outlier_threshold]; a protected cover page; and delivery emailing to [recipients] via [email_method] while keeping [retention_count] archived copies.
Pro tips
- Be specific about
[header_style], number formats, and[chart_types]; vague formatting requests yield generic-looking workbooks that stakeholders distrust. - Build the Summary sheet to pull from the other
[sheet_names]so a single read gives the headline numbers. - Cache query results during development so iterating on formatting does not re-hit
[data_sources]every run. - Place each chart at an explicit cell and size with
[chart_dimensions]; letting the library auto-place charts usually overlaps your data or pushes it off the visible area. - Define
[highlight_rules]in business terms (for example quota bands) so the conditional formatting communicates, not just decorates. - Tie generation to
[report_frequency]and[email_method]delivery so the workbook is produced and sent without anyone touching it, and keep[retention_count]archived copies so prior periods stay available for comparison.