π« The Pain Point
You have a single Excel file with 12 sheets (one per month). You need to send each monthβs data to a different person as separate files.
π Agentic Solution
A Sheet Splitter that exports each tab as its own file.
Key Features:
- Individual Files: One file per sheet.
- Naming Pattern: Use sheet name as filename.
- Format Options: XLSX or CSV output.
βοΈ Phase 1: Commander (Quick Fix)
For quick splitting.
Prompt:
βI have an Excel file
annual_report.xlsxwith 12 sheets. Write a Python script using Pandas to:
- Split: Each sheet into a separate file.
- Naming: Use sheet name (e.g.,
January.xlsx).- Output: Save to
split_sheets/folder.Print progress. Handle empty sheets (skip with warning).β
Result: 12 separate files ready for distribution.
ποΈ Phase 2: Architect (Permanent Tool)
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create a "Sheet Splitter".
**Requirements:**
1. **GUI:**
* Select Excel file.
* Show sheet list with checkboxes.
* Output format (XLSX, CSV).
* Naming pattern input.
* Progress bar.
2. **Logic:**
* Use openpyxl for sheet reading.
* Preserve formatting if possible.
* Handle special characters in sheet names.
3. **Deliverables:**
* `sheet_splitter.py`
* `run.bat`, `run.sh`
* `requirements.txt`
π§ Prompt Decoding
- Preserve Formatting: CSV loses formatting; XLSX keeps it.
π οΈ Instructions
- Copy Prompt β Run.