πŸ“Š

Sheet Splitter

Split an Excel workbook with multiple sheets into separate Excel files (one file per sheet).

Excel ⭐ Beginner ⏱️ 3 minutes

😫 The Pain Point

You have a Master Budget file with 50 sheets (one for each department). You need to email each department ONLY their own sheet. Manually saving 50 times? No.

πŸš€ Agentic Solution

Divider: Bursts the workbook into independent files.

Key Features:

  • Naming: Files are named [SheetName].xlsx.
  • Formatting: Preserves the data structure.

βš”οΈ Phase 1: Commander (Quick Fix)

For a quick burst.

Prompt:

β€œRead Master.xlsx. Iterate through every sheet and save it as a separate Excel file using the sheet name as the filename.”

Result: A folder of files.

πŸ—οΈ Phase 2: Architect (Permanent Tool)

For Accountants.

Engineering Prompt:

**Role:** Python Excel Dev
**Task:** Create an "Excel Sheet Splitter".
**Requirements:**
1.  **GUI:**
    *   Select Input Excel.
    *   Select Output Folder.
    *   "Split All" button.
2.  **Logic:**
    *   Load Excel (`sheet_name=None` gets all sheets).
    *   Loop dict items.
    *   Save each DataFrame to `.xlsx`.
    *   *Tip:* Use `openpyxl` engine if preserving cell colors/styles is required.
3.  **Deliverables:** `sheet_split.py`, `run.bat` (Windows), `run.sh` (Mac).

🧠 Prompt Decoding

  • Format vs Speed: Pandas is fast but strips colors. Openpyxl is slower but keeps colors. The prompt engineer knows this tradeoff and can specify the right tool for the job.

πŸ› οΈ Instructions

  1. Copy Prompt -> Paste -> Run.
  2. Select File -> Split.

Related Workflows

Explore other categories

πŸ“¬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

πŸ“– Free eBook Guide πŸ“¦ 7 Ready-to-use Scripts πŸ”” Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.