Blog

Excel to Markdown: 5 Ways to Convert Spreadsheets (2026)

Need your spreadsheet as a Markdown table? 5 ways to convert Excel to Markdown — from copy-paste tricks to Python to browser converters.

Spreadsheets don't belong in Markdown — until they do. Documentation, GitHub READMEs, AI training data, and RAG pipelines all want tables as text. Here's how to get Excel sheets into clean Markdown tables without retyping them.

The 5 Methods

Method Cost Merged cells Best for
DocToMD (browser) Free 3/day ⚠️* One-off, no install
Excel → HTML → Pandoc Free with Excel ⚠️ Developers
Copy-paste via table generator Free ❌ Tiny tables
Python (pandas/openpyxl) Free Manual handling Pipelines, automation
Excel → CSV → Markdown Free ❌ Simple flat sheets

*Merged-cell handling varies by document complexity — always check the output.

1. DocToMD — Upload and Done

Upload the .xlsx, download Markdown tables — including multi-sheet workbooks. Always spot-check merged cells, which are the #1 casualty in any converter. Try it free at doctomd.com — 3 conversions/day, no signup.

2. Excel → HTML → Pandoc

Pandoc does not read .xlsx files directly. First save your worksheet as a Web Page (.html) in Excel, then convert that HTML file:

pandoc spreadsheet.html -f html -t gfm -o table.md

Caveat: this adds an export step, and merged cells do not map cleanly to standard Markdown tables. Check the output before using it.

3. Copy-Paste Through a Table Generator

Copy cells in Excel, paste into a tool like TableConvert or markdowntable.com. Works for small, flat tables.

Downside: merged cells break, and anything over ~50 rows gets painful.

4. Python Script (pandas)

For pipelines and repeat jobs:

import pandas as pd
df = pd.read_excel("data.xlsx", sheet_name="Sheet1")
print(df.to_markdown(index=False))

Full control, automatable, free. Downside: you write and maintain the script; merged cells need manual handling with openpyxl.

5. Excel → CSV → Markdown

Save as CSV, then convert CSV to a Markdown table (many tiny tools do this). Two hops, but each hop is reliable.

Downside: CSV drops all formatting and merged-cell info; multi-sheet workbooks need one CSV per sheet.

Common Gotchas

  • Merged cells: the #1 problem. Only dedicated converters and custom scripts handle them well.
  • Multiple sheets: decide upfront — one Markdown file per sheet, or concatenated with ## headings.
  • Formulas: export values, not formulas. Markdown tables are static text.
  • Wide tables: Markdown tables with 15+ columns are unreadable in raw form (they still render fine). Consider transposing or splitting.

FAQ

Can I convert Excel to Markdown for free? Yes — DocToMD includes 3 free conversions/day, and Python is free. Pandoc is also free, but requires an intermediate format such as HTML exported from Excel.

How do I put an Excel table in a GitHub README? Convert to a Markdown table and paste it in. GitHub renders Markdown tables natively. Keep columns under ~8 for readability.

What about Google Sheets? Download as .xlsx (File → Download), then use any method above.

Bottom Line

One spreadsheet, no fuss: doctomd.com. Repeatable pipeline: Python + pandas. Already have an HTML export: Pandoc (check merged cells after).

Related: 7 Best Document to Markdown Converters in 2026