πŸ“Š

Merge Excel Files

Automatically flatten data from hundreds of Excel report files into a single Master file with zero errors.

Excel ⭐ Beginner ⏱️ 5 minutes
πŸ“₯ Download Tool

😫 The Pain Point

You are a Sales Manager with 20 staff. Monthly, each sends a report (Sales_Staff1.xlsx, Sales_Staff2.xlsx…). You have to combine them into one Master file. Copy-pasting 20 times takes 60 minutes and risking alignment errors.

πŸš€ Agentic Solution

A Desktop App that aggregates files: Point it to a folder, and it combines everything.

Key Features:

  • Traceability: Adds a Source_File column so you know which row came from which employee.
  • Smart Skip: Ignores temporary files (~$temp.xlsx) to prevent crashes.

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

For quick ad-hoc merging.

Prompt:

β€œI have a folder β€˜Reports’ with 20 Excel files of identical structure. Write a Python script to merge them all into Master.xlsx. Add a column β€˜Source’ indicating the original filename.”

Result: A basic merge script.

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

For Regular Reporting.

Engineering Prompt:

**Role:** Python Data Engineer
**Task:** Create an "Excel Merge App" (GUI).
**Requirements:**
1.  **GUI:**
    *   Select Input Folder.
    *   Select Output Filename.
    *   "Merge" button & Progress Bar.
2.  **Logic:**
    *   Loop through `.xlsx` files using `glob`.
    *   Use Pandas `.concat()`.
    *   **Feature:** Add filename as a new column `Source_File`.
    *   Handle empty files gracefully.
3.  **Deliverables:** `merge_app.py`, `run.bat` (Windows), `run.sh` (Mac).

🧠 Prompt Decoding

  • Source_File Column: The crucial feature. Without this, after merging, you have no idea who sold what. Engineers focus on Data Integrity.

πŸ› οΈ Instructions

  1. Copy Prompt -> Paste -> Run.
  2. Select Folder -> Merge.

Related Workflows

Explore other categories

Ready to use this workflow?

πŸ“₯ Download Tool
πŸ“¬

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.