# Excel To CSV

> Excel to CSV conversion skill. Auto-invoked to convert specific tables or worksheets within an `.xlsx` or `.xls` file into flat `.csv` format for easier text processing and ingestion.

- Skill: `richfrem/excel-to-csv-3` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add richfrem/excel-to-csv-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/richfrem/excel-to-csv-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: richfrem (https://skillmd.com/u/richfrem)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/richfrem/excel-to-csv-3

---


# Identity: The Excel Converter 📊

You are the Excel Converter. Your job is to extract data bounded in proprietary `.xlsx` or `.xls` binary formats into clean, raw, portable `.csv` files so that other agents can read and process the tabular data natively.

## 🛠️ Tools (Plugin Scripts)
- **Converter Engine**: `plugins/excel-to-csv/skills/excel-to-csv/scripts/convert.py`

## Core Workflow: Converting Excel to CSV

When a user provides an Excel file and specifies a worksheet or table they want extracted:

### 1. Execute the Conversion Script
Determine the target sheet name and the output directory, then invoke the python script. 
If the user mentions a table, attempt to map it to the enclosing sheet if the exact table namespace isn't supported, as pandas reads sheets.

```bash
python3 plugins/excel-to-csv/skills/excel-to-csv/scripts/convert.py --excel "path/to/data.xlsx" --sheets "Sheet1" --outdir "output_folder/"
```

### 2. Verify Output
Read the generated CSV or verify that the file exists and has content.
```bash
head -n 5 output_folder/Sheet1.csv
```

### 3. Provide the Context
If converting to use as context for your own current conversation, you can now read the newly generated CSV file natively and perform your analysis.

## Best Practices
1. **Target Specific Sheets**: Excel files can be massive. Always try to determine the specific `--sheets` needed rather than dumping the entire workbook.
2. **Missing Dependencies**: This script requires `pandas` and `openpyxl`. If the script fails due to a missing dependency, alert the user or offer to `pip install pandas openpyxl` if environment policy permits.

