πŸ“Š

Sheet Splitter

Split Excel workbook sheets into separate files.

Excel ⭐ Beginner ⏱️ 2 minutes

😫 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.xlsx with 12 sheets. Write a Python script using Pandas to:

  1. Split: Each sheet into a separate file.
  2. Naming: Use sheet name (e.g., January.xlsx).
  3. 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)

For Accountants.

Engineering Prompt:

**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Sheet Splitter" Desktop App

**Objective:** A simple utility to explode a multi-sheet Workbook into separate Excel/CSV files.

**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Data Engine: Pandas/Openpyxl
* Packaging: PyInstaller

**Functional Requirements:**
1.  **UI Layout (PyQt6):**
    *   **Input:** Source Excel File Select.
    *   **Selection:** ListWidget with checkboxes for each detected Sheet Name.
    *   **Format:** Output format (XLSX keeps format / CSV plain text).
    *   **Action:** "Split Selected" button.

2.  **Core Logic:**
    *   Load workbook metadata.
    *   Iterate selected sheets and save individually.
    *   **Threading:** File writing in background.

3.  **Deliverables:**
    *   `main.py`: Complete source code.
    *   `requirements.txt`: Dependencies.
    *   **Build Instructions:**
        *   Windows: `pyinstaller --onefile --noconsole main.py`
        *   macOS: `pyinstaller --windowed --noconsole main.py`

🧠 Prompt Decoding

  • Preserve Formatting: CSV loses formatting; XLSX keeps it.

πŸ› οΈ Instructions

  1. Copy Prompt β†’ Run.

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.