Skip to content

← Back to articles

Excel to Markdown: from spreadsheet grid to pipe tables

Copy-pasting an Excel range into a Markdown file almost works — until the sheet has merged cells, wide formula columns, or three worksheets instead of one. The plain-text table you get is readable in Notepad but breaks when you paste it into GitHub, Obsidian, or a wiki, because the converter never understood the grid structure it was looking at.

This article walks through what an xlsx → Markdown conversion actually does: how to keep every worksheet, expand merged ranges into honest cells, preserve the dates and numbers Excel itself displays, and land on GFM pipe tables that render everywhere. Everything described here runs in your browser — no upload, no account, no server touching your workbook.

The spreadsheet and the table are not the same thing

An xlsx workbook is a ZIP of XML. Inside it live several worksheets, each one a rectangular grid of cells. A cell may be blank, hold a string, a date stored as a serial number, a formula, or a formatted value like $1,240.50. Ranges of cells can be merged into one visible cell. The whole structure has layout, formulas, and display metadata that Markdown tables simply have no room for.

A Markdown pipe table — the GFM form that GitHub, Obsidian, and most wikis all render — is two rows of metadata followed by one row per data row, every row having the same number of columns. No merged cells, no formulas, no layout. A faithful converter's job is the translation between these two very different worlds: flatten the grid into rows, and make every cell contain the value that Excel would actually show you on screen.

Exporting every worksheet, not just the first

Most quick tools export only the active sheet, which silently drops the rest of the workbook. A real conversion should iterate through every worksheet, skip the truly empty ones, and emit each one as its own Markdown table — with the sheet name as a level-2 heading above it. That way your workbook lands as a single Markdown document that still mirrors the original structure.

On this site the default is "all sheets", but you can also choose "first sheet only" from the worksheet options when you want just one. Empty sheets and sheets that contain nothing but headers are filtered out automatically so they do not become a broken h2 with no table under it.

Merged cells: the invisible problem

Merged cells are the single biggest reason copy-paste produces broken tables. When Excel merges A1:D1 into one visible cell, the underlying grid still has four cells — only A1 holds the value, B1 through D1 are empty. A naive copy-paste or simple converter outputs four columns, three of them blank, which breaks the row count and produces a table that no Markdown parser will render correctly.

The fix is expansion: SheetJS tells us every merged range in the workbook before we build the table. We copy the top-left value of each merged cell into every other cell in that range, so the grid we feed to Pandoc has no gaps. The resulting pipe table has the same cell count as Excel's visible grid, every row lines up, and the table renders cleanly.

Dates, currency, and numbers: show what Excel shows

Excel stores dates as serial numbers — 46095 means January 15, 2026. Raw numeric values like that are useless in Markdown, but a converter that reformats with arbitrary rules will get dates wrong (is that cell 1/2 or 2/1?). The only trustworthy source is the text Excel itself displays, which SheetJS reads directly with the raw:false option.

Currency, percentages, decimal places, thousand separators — all come through as the text you see in the formula bar. 1,240.50 stays 1,240.50, 0.12 stays as 12% if Excel displayed it that way, and 1/15/26 stays exactly that instead of being silently reformatted to 2026-01-15.

Formulas versus values

Excel cells can contain either a formula (=SUM(A1:A10)) or its computed value (1240.50). Markdown tables can hold only the value. Some converters try to preserve the formula syntax, which is rarely useful outside of Excel. We read the computed value — the number or text Excel would show after evaluating the formula — and output that. If you need the formulas themselves, export the workbook to CSV first; this converter is for the readable result, not the calculation.

Wide tables and what to do about them

A worksheet with fifteen columns converts just fine — Pandoc emits a perfectly valid pipe table. Whether it looks good depends on where you read it. Most Markdown renderers wrap pipe tables naturally; Obsidian, GitHub, and Hugo all handle widths well. For destinations that do not, split the workbook into narrower sheets before converting, or accept that a wide table is the honest representation and let the renderer scroll horizontally.

What we do not do is silently drop columns or collapse the data. The table that comes out is exactly the grid that was in the workbook — no surprises, no missing columns.

Why two engines: SheetJS reads, Pandoc formats

This site uses SheetJS Community Edition for the workbook parsing, then hands the resulting HTML table to Pandoc to emit Markdown (GFM). SheetJS handles the tricky Excel internals — merged ranges, date serials, display formats, the ZIP package itself. Pandoc handles the tricky Markdown dialect bits — pipe-table syntax, alignment hints, and the final CommonMark compliance.

Running both in the browser means nothing touches a server. The SheetJS library is only downloaded when you actually drop an xlsx file, and Pandoc is already resident in the tab from your first use of the converter. Total end-to-end time on a typical multi-sheet workbook is under ten seconds.

Keep reading

Convert Excel to Markdown