πŸ“Š

Inventory Check

Compare two Excel files to find differences in inventory levels.

Excel ⭐⭐ Intermediate ⏱️ 5 minutes

😫 The Pain Point

You have yesterday’s stock count and today’s stock count in two Excel files. You need to find what changed: new items, removed items, quantity differences.

πŸš€ Agentic Solution

A Smart Diff Tool that compares datasets and highlights changes.

Key Features:

  • Match Key: Compare using SKU or Product ID.
  • Change Detection: Added, Removed, Modified rows.
  • Delta Calculation: Show quantity differences.

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

For quick comparison.

Prompt:

β€œI have two Excel files: stock_yesterday.xlsx and stock_today.xlsx, both with columns β€˜SKU’ and β€˜Quantity’. Write a Python script using Pandas to:

  1. Compare: Find differences using SKU as key.
  2. Classify:
    • New: SKU exists only in today
    • Removed: SKU exists only in yesterday
    • Changed: Quantity difference
  3. Output: Save stock_diff.xlsx with Status and Delta columns.

Print summary counts.”

Result: Clear inventory change report.

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

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create an "Excel Diff Tool".

**Requirements:**
1.  **GUI:**
    *   Select two Excel files.
    *   Key column dropdown.
    *   Compare columns selection.
    *   Highlight changes (color coded).
    *   Export diff report.

2.  **Logic:**
    *   Merge on key column.
    *   Calculate deltas for numeric columns.
    *   Handle missing keys.

3.  **Deliverables:**
    *   `inventory_diff.py`
    *   `run.bat`, `run.sh`
    *   `requirements.txt`

🧠 Prompt Decoding

  • Merge Types: Left, Right, Outer, Inner - control which records appear in diff.

πŸ› οΈ Instructions

  1. Copy Prompt β†’ Specify files β†’ 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.