Excel Description Filler Tool π
Appearance
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 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)
pandaslibrary (data manipulation)openpyxllibrary (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
- Always test with 2β3 products before bulk processing
- Keep a backup of your original Excel file
- Product names must match character-for-character
- Review the generated file before importing
- 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 |