Skip to content
Back to skills

Excel To Csv

ASecurity

Excel to CSV conversion skill. Convert specific bounding tables or entire worksheets within `.xlsx` or `.xls` binary formats into flat `.csv` tabular data. Use this when you find an Excel file and need its data mapped into an accessible format for text analysis, filtering, or programmatic pipelining.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 6, 2026
toolspythonrustbash

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned June 6, 2026

npx -y skills add richfrem/Project_Sanctuary --skill excel-to-csv --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Excel To Csv?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Excel To Csv
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-excel-to-csv/badge)](https://www.skillsdirectory.com/skills/richfrem-excel-to-csv)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: excel-to-csv
description: >
  Excel to CSV conversion skill. Convert specific bounding tables or entire worksheets within `.xlsx` or `.xls` 
  binary formats into flat `.csv` tabular data. Use this when you find an Excel file and need its data mapped into 
  an accessible format for text analysis, filtering, or programmatic pipelining.
allowed-tools: Bash, Read, Write
dependencies: ["pip:openpyxl", "pip:pandas"]
---
# 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**: `../../scripts/convert.py`
- **Verification Engine**: `../../scripts/verify_csv.py`

## Core Workflow: The Extraction Pipeline

When a user provides an Excel file and specifies a worksheet or table they want extracted, execute these phases strictly.

### Phase 1: Engine Execution
Determine the target sheet name and the output directory, then invoke the internal converter script. 
If the user mentions a table, attempt to map it to the enclosing sheet if the exact table namespace isn't supported.

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

### Phase 2: Delegated Constraint Verification
**CRITICAL L5 PATTERN: Do not trust that the conversion was flawless.**
Immediately after generating the `.csv`, execute the verification engine:

```bash
python3 ./scripts/verify_csv.py "output_folder/Sheet1.csv"
```
- If the script returns `"status": "success"`, proceed to Phase 3.
- If it returns `"status": "errors_found"`, review the JSON log. Common issues involve jagged headers or blank lines. Use bash tools (like `awk` or `sed`) to repair the `.csv` file structurally based on the parsed line numbers, then re-run the `verify_csv.py` loop until it passes.

### Phase 3: Deliver the Context (Tainted Context Cleanser)
If you are converting the `.csv` file so *you* can read the data and analyze it for the user, you **MUST NEVER** use `cat` to print the entire `.csv` file directly into your conversation history.
Large CSV files will crash your context window.

- **Check Size**: Run `wc -l output_folder/Sheet1.csv`.
- **If <= 50 lines**: You may use `cat` to read it natively.
- **If > 50 lines**: You must chunk your reads (e.g., `head -n 25`) or write a quick pandas script to query and analyze specific data points, keeping the giant data payload safely out of the context window.

## Architectural Constraints

### ❌ WRONG: Custom Parsers (Negative Instruction Constraint)
Never attempt to write arbitrary Python scripts using raw `openpyxl` commands to try and reinvent the `.xlsx` to `.csv` pipeline from scratch.

### βœ… CORRECT: Native Engine
Always route binary extractions through the `convert.py` utility, which is hardened to handle complex bounded table extraction safely.

## Next Actions
If the `convert.py` script returns a brutal exception (e.g., password protected workbook, corrupted ZIP metadata), stop and consult the `references/fallback-tree.md` for alternative extraction strategies.

Files in this skill

  • SKILL.md3.2 KB
  • evals/evals.json1.9 KB
  • output/exampleSHEET.csv1.3 KB
  • references/acceptance-criteria.md684 B
  • references/example.xlsx34.7 KB
  • references/fallback-tree.md1.7 KB
  • scripts/convert.py7.4 KB
  • scripts/verify_csv.py2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.