Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
coolbit avatar

Xlsx To Markdown

  • 1 installs
  • Updated August 4, 2026
  • coolbit/excel-to-markdown

Convert Excel spreadsheets to Markdown tables and documentation.

About

CLI tool for transforming Excel files into Markdown format. Preserves formatting and creates easily shareable documentation from spreadsheet data.

  • Excel to Markdown table conversion
  • Batch processing multiple spreadsheets

Xlsx To Markdown by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,983 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/coolbit/excel-to-markdown --skill xlsx-to-markdown

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedAugust 4, 2026
Repositorycoolbit/excel-to-markdown

What it does

Convert Excel spreadsheets to Markdown tables and documentation.

Files

SKILL.mdMarkdownGitHub ↗

xlsx → faithful Markdown

Turns a workbook where text and images are laid out together across many tabs into: per-sheet PNGs that look exactly like Excel (sharp, not split) + the cell text as searchable Markdown.

Quick start

python3 scripts/xlsx_to_md.py "INPUT.xlsx" OUTDIR [--dpi 200]

Produces OUTDIR/<name>.md and OUTDIR/render/tab1.png … tabN.png. Each tab section = the rendered image + a <details> block of extracted text.

How it works (and the core lesson)

A flow diagram's meaning lives in its 2D layout + arrows + labels — extracting the embedded sprite images individually loses that. So render the whole sheet.

Fidelity = render at 100% scale (no fit-to-page) on a huge page so nothing is split, then trim whitespace. It is NOT about DPI:

  • Text/arrows/shapes are vector → DPI helps, no ceiling.
  • Embedded screenshots are raster with fixed source pixels → cranking DPI just

interpolates (stays blurry). Shrinking them (fit-to-page) is what causes blur.

  • So never fitToHeight=1/fit-to-page for fidelity; keep scale=100. 200 dpi is

plenty to capture native pixels; higher only sharpens vector text.

The script (see scripts/xlsx_to_md.py): 1. Unzip xlsx; read workbook.xml (sheet order), sharedStrings.xml. 2. Extract text per sheet in row order. Strip furigana (<rPh>); render strikethrough runs (<strike/>) as <del>…</del> (= author's "delete" intent). 3. Inject <pageSetup paperWidth/Height="3000mm" scale="100" orientation="landscape"/> + pageSetUpPr fitToPage="0" into each sheet; re-zip. 4. soffice --headless --convert-to pdf (one big page per sheet, nothing split). 5. Probe content size per page at 50 dpi (magick -trim), then pdftoppm each page cropped to content at target dpi, magick -trim the result. 6. Emit Markdown: per tab → image + collapsible extracted text.

Dependencies

Needs three CLIs: soffice (LibreOffice), pdftoppm (poppler), magick (ImageMagick).

brew install poppler imagemagick

LibreOffice install — try brew install --cask libreoffice first. If it fails with a macOS-version error (stale cask on a new OS), install the official dmg:

# pick arch: aarch64 (Apple Silicon) or x86-64 (Intel)
V=$(curl -fsSL https://download.documentfoundation.org/libreoffice/stable/ \
    | grep -oE '[0-9]+\.[0-9]+\.[0-9]+/' | sort -V | tail -1 | tr -d /)
curl -fL -o /tmp/LO.dmg \
  "https://download.documentfoundation.org/libreoffice/stable/$V/mac/aarch64/LibreOffice_${V}_MacOS_aarch64.dmg"
hdiutil attach /tmp/LO.dmg -nobrowse -quiet
cp -R "/Volumes/LibreOffice/LibreOffice.app" ~/Applications/   # /Applications needs admin
hdiutil detach "/Volumes/LibreOffice" -quiet
xattr -dr com.apple.quarantine ~/Applications/LibreOffice.app

The script auto-detects soffice in PATH, /Applications, and ~/Applications (or pass --soffice /path/to/soffice).

Notes & gotchas

  • One PNG per sheet covers the entire used range (tables + diagrams + screenshots),

so text-heavy and image-heavy tabs both render completely.

  • --paper-mm (default 3000) must exceed the widest sheet at 100% scale, else that

sheet splits across pages. Bump it for unusually wide workbooks.

  • --dpi 200 default; raise to 300 only if vector text needs to be sharper (bigger files).
  • Need the absolute sharpest single screenshot? The originals are in xl/media/

inside the unzipped xlsx — that's the native-resolution ceiling.

  • To isolate just a diagram, set a print area (defined name _xlnm.Print_Area) to its

cell range before step 4; otherwise the whole sheet is rendered.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.