Jump to content

Excel Description Filler Tool πŸ“

From MediawikiCIT
Revision as of 06:57, 25 February 2026 by BabiSender (talk | contribs) (Created page with "== Excel Description Filler Tool == Automatically populate product descriptions in your Excel spreadsheet using Python. Perfect for e-commerce product imports, inventory management, and bulk data processing. ---- == What This Tool Does == # Reads your Excel file with product names # Matches products to pre-written descriptions # Fills in blank Description cells automatically # Preserves existing descriptions (will not overwrite) # Saves a new Excel file with complete...")
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)

Excel Description Filler Tool

Automatically populate product descriptions in your Excel spreadsheet using Python. Perfect for e-commerce product imports, inventory management, and bulk data processing.


What This Tool Does

  1. Reads your Excel file with product names
  2. Matches products to pre-written descriptions
  3. Fills in blank Description cells automatically
  4. Preserves existing descriptions (will not overwrite)
  5. Saves a new Excel file with completed data

Files Included

File Description
description.py The main Python script (heavily commented)
QUICKSTART.md Get started in 5 minutes
INSTRUCTIONS.md Complete step-by-step guide
TEMPLATE_GUIDE.md Examples and formatting templates
README.md Project overview

Requirements

  • Python 3.7+ (Python 3.9+ recommended)
  • pandas library (data manipulation)
  • openpyxl library (Excel file support)

Your Excel file must have these columns:

  • Item Name – product names to match
  • Description – column to fill (can be empty)

Quick Start (5 Minutes)

Step 1 – Install Python

Windows: Download from python.org β†’ check "Add Python to PATH" during installation.

Linux (Ubuntu/Debian):

sudo apt install python3 python3-pip

Step 2 – Install Required Libraries

Windows:

pip install pandas openpyxl

Linux:

pip3 install pandas openpyxl

Step 3 – Get Product Descriptions Using AI

Ask Claude or ChatGPT using a prompt like:

I need concise product descriptions (50-80 words each)
for these products suitable for a professional webstore:

- Product Name 1
- Product Name 2
- Product Name 3

Include key specifications, features, and target use cases.
Format: Professional, B2B tone.

Step 4 – Organize Your Files

Place both files in the same folder:

πŸ“‚ Downloads/
β”œβ”€β”€ description.py
└── your-data.xlsx

Step 5 – Configure the Script

Open description.py and update these sections:

Input filename (line 19):

path = "your-data.xlsx"

Product descriptions (lines 24–50):

descriptions = {
    "Product A": "Description for Product A...",
    "Product B": "Description for Product B...",
}

Step 6 – Run the Script

Windows:

cd C:\Users\YourName\Downloads
python description.py

Linux:

cd ~/Downloads
python3 description.py

Step 7 – Check Output

Look for the file: webstore_import_with_descriptions.xlsx


Description Dictionary Format

Basic Template

descriptions = {
    "Product Name 1": "Short description here.",
    "Product Name 2": "Another short description.",
    "Product Name 3": "Yet another description.",
}

Multi-Line Template (Recommended)

descriptions = {
    "Product Name 1": (
        "First part of the description. "
        "Second part of the description. "
        "Third part continues here."
    ),
    "Product Name 2": (
        "Another product with a longer description "
        "that spans multiple lines for better readability."
    ),
}

Common Mistakes

❌ Wrong βœ… Correct
"Dell OptiPlex" (too generic, won't match) "Dell OptiPlex 7010" (exact match)
Dell OptiPlex 7010: "..." (missing quotes on key) "Dell OptiPlex 7010": "..."
Missing comma after entry Each entry ends with a comma

The Full Script

import pandas as pd

# ============================================================================
# CONFIGURATION SECTION - UPDATE THESE VALUES
# ============================================================================

# STEP 1: Change this to your Excel filename
path = "251106 netgate selling price.xlsx"

# STEP 2: Add your product descriptions here
descriptions = {
    "Netgate 8300 TAA": (
        "pfSense+ 1U security gateway with Intel Xeon D-1733NT (8-core/16-thread) and Intel AVX-512. "
        "Ports: 4Γ—10G SFP+, 4Γ—1G SFP, 3Γ—2.5G RJ-45; PCIe expansion up to 10/25/100G. "
        "TAA-compliant hardware; built for medium/large sites, MSPs, and data centers."
    ),
    # ADD MORE PRODUCTS HERE...
}

# STEP 3 (Optional): Change output filename
output_filename = "webstore_import_with_descriptions.xlsx"

# ============================================================================
# MAIN SCRIPT
# ============================================================================

print(f"Loading Excel file: {path}")
df = pd.read_excel(path, sheet_name=0)
print(f"βœ“ Loaded {df.shape[0]} rows and {df.shape[1]} columns")

def fill_desc(row):
    name = str(row.get("Item Name", "")).strip()
    existing = row.get("Description", "")
    if pd.notna(existing) and str(existing).strip():
        return existing
    return descriptions.get(name, "")

print("\nProcessing descriptions...")
df["Description"] = df.apply(fill_desc, axis=1)

filled_count = df["Description"].notna().sum()
print(f"βœ“ Filled {filled_count} descriptions")

print(f"\nSaving to: {output_filename}")
df.to_excel(output_filename, index=False)
print("βœ“ File saved successfully!")

Troubleshooting

Issue Solution
ModuleNotFoundError: pandas Run: pip install pandas openpyxl
FileNotFoundError Check Excel file is in the same folder as the script
Descriptions not filling Product names must match exactly (case and spacing)
Permission denied Close the Excel file if it is currently open
Character encoding issues (e.g. Γƒβ€” instead of Γ—) Save the .py file with UTF-8 encoding

Best Practices

  1. Always test with 2–3 products before bulk processing
  2. Keep a backup of your original Excel file
  3. Product names must match character-for-character
  4. Review the generated file before importing
  5. Use UTF-8 encoding to prevent character display issues

Workflow Summary

1. Get product names from Excel
        ↓
2. Generate descriptions using AI
        ↓
3. Format as Python dictionary
        ↓
4. Update description.py
        ↓
5. Run script
        ↓
6. Check output file
        ↓
7. Import to your system

Performance

Metric Value
Processing Speed ~1,000 rows per second
File Size Limit Tested up to 100,000 rows
Memory Usage < 100 MB for typical files
Excel Compatibility .xlsx, .xlsm formats