Home / Skills / Office & Docs / Convert Excel to Markdown
Office & Docs

Convert Excel to Markdown

awesome-copilot communityMITSkill language: English
License verifiedIncludes scriptsMedium risk
DemoReal run · claude-sonnet-5-5 · October 2026
I have a workbook at .claude/skills/convert-excel-to-md/sales.xlsx with our Q3 sales. Please tell me the total revenue for each product, which region has a missing value, and the refunded units per region. The Python interpreter that has markitdown installed is /private/tmp/claude-501/-Users-huipeizhu-git-aibars-portal/1db8d52d-0133-4843-9915-dc2b4b4fafd0/scratchpad/mdtest/.venv/bin/python — use it by that exact path, and use relative paths for the script and the workbook.
Skill: convert-excel-to-md
Read: sales/sales.md

Revenue totals (from the Revenue column of the Q3 Sales sheet):

  • Widget: 1,900 (North 1,140 + South 760)
  • Gadget: 1,800 (East 1,080 + North 720). West's Gadget row has no revenue value, so it isn't included.

Missing value: West. The 2026-07-05 Gadget row has no Units and no Revenue. The unit price is 24.0, so the revenue can't be worked out without the units.

The sheet's own Total row shows 3,700 revenue and 275 units. That matches the sum of the rows that have values (1,900 + 1,800 = 3,700), so the total also leaves out West's missing sale.

Refunded units per region (Refunds sheet):

  • East: 3
  • North: 2
  • South and West: none listed, so presumably 0.

I converted the workbook to Markdown, and the output is in .claude/skills/convert-excel-to-md/sales/sales.md.

试用方式:Skill 的 Python 脚本需要 markitdown 包,我在隔离的临时环境里装好,并在提示词里给出解释器路径;Bash 只放行这条脚本命令。示例工作簿是我构造的(含一个有意留空的单元格和一张退款表)。模型的数字与我用代码复算的结果一致:Widget 1,900、Gadget 1,800、合计 3,700。

What it does

Runs a bundled Python script, built on MarkItDown, that converts an .xlsx workbook into Markdown tables so a model can analyse, summarise or extract data from it reliably. Embedded images are pulled out of the workbook and written to an img/ folder, and each sheet's section links to its images. It works on a single file or a folder of workbooks, optionally recursively, and the output goes to a <name>/ folder next to the source or to a folder you choose with -o.

How it works

  1. One-time setup from references/setup.md (Python, pip and markitdown[xlsx]).
  2. python scripts/convert_excel_to_md.py <file-or-folder> [-o <output-folder>] [--recursive].
  3. The model reads the resulting <name>.md.

Good for

Asking questions about a spreadsheet, pulling data out of it or summarising it.

Notes & risks

Medium risk: it runs a Python script and needs `pip install` of `markitdown[xlsx]`; the setup file's Linux step uses `sudo apt-get install` (administrator rights). It writes `<name>/<name>.md` and an `img/` folder, and deletes an existing `img/` folder in the destination before extracting images (only that subfolder; confirmed in testing, so choose an output folder you can afford to change). The skill's description tells the model to run the script for every `.xlsx` and to also invoke PDF and Word sibling skills, which are not listed here. No network requests. Test-run in an isolated environment (single file, batch, `-o`, `.xls` and bad paths rejected), correct output, but: empty cells show as `NaN`, a `|` in a cell breaks the table, formula cells in files never saved by Excel show NaN, and a corrupt `.xlsx` is reported as OK.