richfrem/project_sanctuary · Archived

excel-to-csv

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.

First seen Mar 26, 2026

Installation

$ npx skills add richfrem/project_sanctuary --skill excel-to-csv

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from richfrem/project_sanctuary · top by installs.

npx skills add richfrem/project_sanctuary

Browse all from richfrem/project_sanctuary

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 4
License LICENSE
Default branch main
Open issues 1
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read, Write

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,234 B
  • docs SUMMARY.md 321 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

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.

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:

python3 ./scripts/verify_csv.py "output_folder/Sheet1.csv"
  • If the script returns "status": "success", proceed to Phase 3.
  • If it returns "status": "errorsfound", 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 verifycsv.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.