Guide · Excel → Markdown

Excel to Markdown: formulas and formatting

A Markdown table is a rectangle of text. A worksheet is a rectangle of cells, and a cell can carry a formula underneath it, a display mask over it, and a merge stretching it across its neighbours. Three of those four have nowhere to land.

Which makes the useful question a narrow one: of everything the sheet knows, what reaches the table, and is the part you came for among it?

Open the converter

Formulas become their answers

=SUM(B2:B9) arrives as 4211. That's the useful direction, because Markdown computes nothing — a pasted formula would sit in the document as inert characters that look like they mean something and don't.

It works because Excel caches the calculated value next to the formula every time it saves the file. The converter reads the cached value, which is why it doesn't need a formula engine of its own and why the whole thing can run in a browser tab.

Cell in Excel
B10:  =SUM(B2:B9)
Markdown
| Total | 4211 |

Workbooks nobody has ever opened

If the workbook was generated by a script — a Python export, a reporting job, anything using a spreadsheet library — and never opened in Excel, there's no cached value. Nothing wrote one. Those cells convert to empty.

One round trip fixes it: open the workbook in Excel or LibreOffice, save, close. Saving is what fills the cache in. And a sheet that still reads as empty gets named above the output, so you won't copy away a table of blanks by accident.

Formula errors come out empty too, rather than as #DIV/0! or #REF!. A broken lookup down one column produces a column of blanks — so if a column is empty for no obvious reason, check the source.

Number formats don't survive

Of everything on this page, this is the one to read before converting. Excel keeps the display mask and the stored number in different places, and only the stored number is data — the mask is a rendering instruction.

Which is why $1,234.50 lands as 1234.5 and a cell reading 12.50% lands as 0.125. Nothing was mangled: those are the numbers the file has always held, shown without the mask.

If the formatting matters, add a column in the spreadsheet holding the formatted string built with a TEXT() formula, and use that column instead. Then it's text, and text comes through exactly as written.

Dates are the exception. They're stored as numbers too, but the number format identifies them, so they come out as 1995-01-01, with a time appended when there is one. They're read back in UTC deliberately — the naive version shifts every date back a day for anyone west of Greenwich.

Merged cells split

A title merged across A1:C1 becomes one cell holding the text and two empty cells beside it. Excel keeps the value in the top-left cell of a merge and leaves the rest genuinely empty, so that's what there is to read.

Markdown has no colspan, so there's no way to put it back. Unmerge in Excel first if the layout matters — often the merges were only there to centre a heading.

Colours, fonts, borders, conditional formatting and cell comments go the same way, for the same reason: Markdown has no syntax for any of them.

Sheets, one at a time or several

The heading only appears when more than one sheet is selected. With a single sheet you already know which one it is, and a heading would be noise.

Trailing empty rows are trimmed first, which matters more than it sounds: clicking around an empty area in Excel can leave a sheet claiming several hundred rows that hold nothing. A sheet that's empty after trimming says so instead of producing a table of blanks.

  1. 01Drop the workbook. The sheet names come back as a list with row counts, and the first sheet is converted.
  2. 02Tick the sheets you want. Changing the selection re-renders from the copy already in memory — the file isn't read again.
  3. 03Several selected sheets come out as one document, each table under a ## heading carrying the sheet name.

The size ceilings, and the files that get refused

10 MB per workbook — lower than the 25 MB other formats get. An .xlsx is a zip, and unpacking one in a tab costs far more memory than the file size suggests.

100,000 cells across everything selected, which is why picking fewer sheets can get a large workbook through when the whole thing won't fit.

Password-protected workbooks are refused rather than half-read. So are the old binary .xls files — both are OLE containers rather than zips, and neither can be read here. Open it in Excel and save as .xlsx without a password.

Drop a .docx or a PDF on this page by mistake and it won't try: the file header is checked first, and the message names the page that does take it.

Drop the workbook, tick the sheets you want, copy the table. The .xlsx is unzipped in this tab and goes nowhere else, which matters when the file is a financial model.

Excel → MD