excel-to-csv

Convert Excel workbooks and legacy CSV files into UTF-8 CSV files for analysis.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/hivgb1-ai/do-better-workspace-v2 --skill excel-to-csv-hivgb1-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: excel-to-csv
Source: https://github.com/hivgb1-ai/do-better-workspace-v2/tree/main/.claude/skills/excel-to-csv
Command: npx skills add https://github.com/hivgb1-ai/do-better-workspace-v2 --skill excel-to-csv-hivgb1-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, and includes scripts (resource) components.

What problem does it solve? Claude Code cannot read .xlsx or .xls files directly, and Korean business spreadsheets often contain multi-row headers, metadata rows, merged cells, and non-UTF-8 encodings that break naive conversion. This Skill converts Excel files into clean UTF-8 CSVs that Claude can read and analyze. ## Core Features & Use Cases - Complexity Analysis: The --info mode inspects each sheet and auto-detects multi-row headers, metadata rows, subtotals, text-formatted numbers, crosstab layouts, and mixed date formats, then recommends the right flags. - Header Flattening & Row Skipping: Flattens multi-row headers into Parent_Child format and skips metadata rows so the output CSV has a single clean header row. - Batch & Encoding Conversion: Converts entire folders of Excel files at once and transcodes legacy CSVs (EUC-KR, CP949) to UTF-8. - Use Case: You receive a Korean sales report with a two-row header and merged region cells. Run the converter with --flatten-headers to get an analysis-ready CSV, then hand off subtotal and number-format cleanup to the csv-clean skill. ## Quick Start Convert this Excel file to CSV so you can analyze it, flattening any multi-row headers if detected.

Frequently Asked Questions about excel-to-csv

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert an Excel file to CSV in Python?

Use openpyxl to load the workbook and write each sheet's rows to a CSV file with the csv module. This converter handles merged cells, auto-detects header rows, and always outputs UTF-8 encoding.

How to flatten multi-row headers when converting Excel to CSV?

Pass the --flatten-headers flag, which joins stacked header rows into a single Parent_Child column name. The script auto-detects how many header rows exist, or you can set it explicitly with --header-rows N.

Can I convert EUC-KR or CP949 encoded CSV files to UTF-8?

Yes, pass a .csv file directly and the script detects the source encoding among UTF-8, EUC-KR, CP949, and UTF-16 variants, then writes a UTF-8 copy. You can also force an encoding with --encoding euc-kr.

Does openpyxl support reading .xls files?

openpyxl natively reads only .xlsx files; legacy .xls support is limited and may fail depending on the file. For reliable .xls handling, convert the file to .xlsx first or use a library like xlrd.

Why does my converted CSV have subtotal rows and formatted numbers?

The converter preserves cell values as-is, so subtotals and text-formatted numbers like "1,234" or "₩500" carry over. Run the companion csv-clean script with --remove-subtotals and --clean-numbers to fix data quality issues.