Excel to Markdown Tables
Operator: Abdulla Al Fahad. How tools are built and checked
Copying a range out of Excel and pasting it into a chat box gives tab-separated text. The tabs do mark the cell boundaries, but they look like ordinary spaces when you read the prompt back, a cell holding a line break arrives wrapped in quote marks across two lines, and the paste says nothing about which sheet it came from or how much of the sheet stayed behind. A Markdown table makes the structure visible: every cell sits between pipes and a separator line marks the header. This tool reads the workbook file itself, lets you tick the sheets you want, and writes each one as a Markdown table, or as CSV inside a fenced code block when you would rather not spend tokens on pipes and padding.
Long sheets are what usually breaks a prompt, so each sheet is cut to a row and column limit you choose, 200 rows and 30 columns to begin with. Whenever something is cut, an italic line above that table says what is missing, for example "first 200 of 1,046 data rows; columns AE to AN left out", so the model is told it is looking at part of the sheet. An estimated token count appears next to every sheet and for the output as a whole.
Key features
- Sheet list with each sheet's used range, its size in rows and columns, a hidden flag and an estimated token count
- Tick or untick sheets; hidden sheets start unticked and empty sheets cannot be ticked
- Row limit (1 to 2,000 below the header) and column limit (1 to 100), with a note in the output saying what was cut
- Cell text as displayed by the number format, or the stored values underneath
- Markdown tables, or CSV in a fenced block for fewer characters
- Pipes escaped as \| and line breaks written as <br> inside table cells
- Optional heading with each sheet name; header row from the sheet or from column letters
- Estimated tokens per sheet and in total, with the estimation method shown next to the number
- Copy to the clipboard or download as a .md file
How sheets become pipe tables or fenced CSV
Input is one .xlsx workbook (a ZIP of XML parts) or an older binary .xls file, up to 25 MB. The workbook is opened with the SheetJS library. Each sheet is read from the top down to row 2,101 and no further: that covers the 2,000-row maximum, a header row and up to 100 rows of titles or blank space above the table. If the rows that are read hold more than 1,000,000 cells across all sheets, the workbook is refused. Files protected with an opening password cannot be read at all.
The Markdown output gives each sheet an optional "## Sheet name" heading, the note line when something was cut, a header row, a separator row of "| --- |" cells and then one table row per sheet row. A pipe inside a cell is written as \| and a line break as <br>, so neither can split the row. Empty rows and columns around the text are removed; an empty row inside the table stays as a row of empty cells, because it often separates two blocks of data. With "First row is the header" switched off, the header row is made of the sheet's own column letters (B, C, D...), so you can ask about "column D" and mean the same thing Excel does.
CSV mode writes the same rows between ```csv fences. Fields that contain commas, quote marks or line breaks get surrounding quotes, with any inner quote doubled; every other field is left bare. The fence is made one backtick longer than the longest run of backticks found in any cell, so a cell that contains a code fence cannot end the block early. Either way the download is a .md file, and both formats can be mixed with your own prompt text.
How it works
Before anything heavy happens, the opening eight bytes decide whether the file is a workbook at all. An .xlsx starts with the ZIP marker PK and an .xls with the compound-file marker D0 CF 11 E0; a CSV, a PDF or a renamed file stops here with a message. Only after that is the 25 MB limit applied and the SheetJS code fetched from this site, and then the workbook is parsed with formulas switched off, so every formula cell gives the result Excel saved the last time the file was saved.
For each cell the tool builds one piece of text. In displayed mode it uses the text the cell's number format produces: $1,234.50, 12.5%, TRUE, #DIV/0!. The one exception is Excel's two built-in short date formats, which SheetJS reports as m/d/yy and m/d/yy h:mm. Excel shows those in the order of the reader's region, so the same cell reads 4/5/25 in one country and 05/04/2025 in another, and the file does not record which order the author saw; the tool writes them as 2025-04-05 instead. In stored mode a number is written with up to 15 significant digits, the most Excel's formula bar shows, a percentage becomes its fraction (0.284), a date becomes an ISO date and time, and a duration formatted as [h]:mm stays a fraction of a day (36 hours is 1.5). Spaces at both ends of every cell are trimmed in either mode.
The table for a sheet starts at the first row that has any text. With the header option on, that row supplies the column names and the row limit counts the rows below it; an empty header cell is named after its column, such as "Column D". Columns start at the first column with text in the rows being shown, and the column limit counts from there. Rows at the bottom of the window that turn out to be empty are dropped, and a merged range contributes its value once, in its top-left cell, as SheetJS reports it.
Each token figure is an estimate: the page counts characters (about four per token, one per Chinese, Japanese or Korean character) and words, averages the two results and widens the midpoint into a range. While the page is open it keeps two things in memory: the parsed workbook, limited to the rows that were read, and the Markdown for the ticked sheets, which is rebuilt from that workbook whenever an option changes. Picking another file replaces both.
Common use cases
- Asking a model to spot outliers in a monthly sales sheet without pasting all 12 tabs
- Giving a coding assistant the exact column names and a sample of rows before it writes an import script
- Sharing a budget sheet's summary tab in a prompt while leaving the hidden lookup sheets out
- Turning a price list into a Markdown table for a README or an internal wiki page
- Checking how many tokens a sheet will cost before deciding how many rows to include
How to use this tool
- Pick an .xlsx or .xls file, or press Use sample workbook to try a small two-sheet file made in the tab.
- In the sheet list, tick the sheets the prompt needs and untick the rest. The used range and size columns show which sheets are large.
- Set the maximum rows and columns. Start small: a model usually needs the shape of the data and a sample, not all 40,000 rows.
- Choose displayed text if the formatting carries meaning (currency, percentages), or stored values if you need full precision.
- Pick Markdown tables or CSV in a fenced block and check the preview, including any italic note about cut rows or columns.
- Press Copy Markdown and paste it into your prompt, or Download .md to keep a copy next to the workbook.
Example
Sheet "Stock", A1:F4: Received uses Excel's built-in short date, Margin is formatted 0.0%, Unit cost $#,##0.00, and the A4 labels cell has a line break before "matte"
SKU Item Received On hand Margin Unit cost
BX-12 Box | 12 pack 4/5/25 140 28.4% $3.50
BX-24 Box | 24 pack 4/8/25 62 31.3% $6.10
LBL-A4 Labels A4 4/13/25 1200 41.0% $0.08
matteMarkdown, displayed text (296 characters, an estimated 70 tokens; CSV mode gives 210 characters, about 59)
## Stock
| SKU | Item | Received | On hand | Margin | Unit cost |
| --- | --- | --- | --- | --- | --- |
| BX-12 | Box \| 12 pack | 2025-04-05 | 140 | 28.4% | $3.50 |
| BX-24 | Box \| 24 pack | 2025-04-08 | 62 | 31.3% | $6.10 |
| LBL-A4 | Labels A4<br>matte | 2025-04-13 | 1200 | 41.0% | $0.08 |Tips for best results
- Lower the row limit first. Twenty representative rows plus the header often answer a question about structure as well as two thousand.
- Use CSV mode for wide numeric sheets; on the example above it saved 86 characters out of 296.
- If the first row of a sheet is a report title, switch the header option off, or delete the title rows in a copy of the workbook, so real column names reach the model.
- Read the italic note before pasting. If it says columns were left out, the column you care about may be one of them.
- Keep sheet headings on when you paste several sheets; they give the model a name to refer to each table by.
Edge cases to watch
Displayed text rounds to the number format. The unit cost of 0.0825 shows as $0.08 in the example, so a model asked to multiply it gets the wrong answer. Switch to stored values when the precision matters.
Rows hidden by a filter or by hand are still included, because the tool reads cell values, not what is visible on screen.
Only the first 2,101 rows of a sheet are ever read. A table that starts below row 100 can show fewer rows than the limit you set, and the note says so.
A formula whose result was never saved, which happens with files written by scripts rather than by Excel, comes out as an empty cell.
Indentation made with leading spaces is lost when cells are trimmed, so an outline-style report loses its levels. Add a level column in a copy if the hierarchy matters.
The model sees a Markdown table as text. Nothing in the output records formulas, colours, comments or which cells were merged beyond the top-left value.
Common errors and how to fix them
- "This is a text file, which has no sheets for this page to read."
- The file name ends in .csv, .tsv or .txt and the content is not a workbook. Use the CSV to Markdown tool linked under the message, or open the file in a spreadsheet app and save it as .xlsx first.
- "This workbook is password-protected, so its sheets cannot be read."
- The file is encrypted with an opening password, so its contents are unreadable without it. In Excel, clear the password under File > Info > Protect Workbook > Encrypt with Password, save a copy and choose the copy. A sheet that is only protected against editing opens normally.
- "This workbook is larger than the 25 MB this converter accepts."
- Save a copy that holds only the sheets you want as Markdown and choose that copy. Images, pivot caches and sheets you are not converting often make up most of a workbook's size.
- The page says the sheets hold more than 1,000,000 cells in their first 2,101 rows.
- Some sheet is very wide or full of formatted empty cells. Delete unused columns, or copy only the needed range into a new workbook.
- A ticked sheet shows "No cell text in this mode".
- Its cells have values but no visible text, for example a custom format of ;;; that hides numbers. Switch Cell text to Stored values.
Best practices
- Tell the model in your own words what the table is and which sheet it came from; the heading only gives the sheet name.
- Keep column names short and unique in the workbook; they are repeated in every prompt you paste them into.
- Compare the per-sheet token estimates and drop sheets that cost a lot but add little to the question.
- Paste stored values for calculations and displayed text for wording that should match a printed report.
Displayed text or stored values
Displayed text is what a person reading the sheet sees, which is usually what you want when the question is about the report: a model asked to summarise margins should see 28.4%, not 0.284. It also keeps currency symbols and thousands separators, which cost a few characters each.
Stored values are what formulas work with. They avoid rounding (0.0825 instead of $0.08), drop the symbols, and turn every date-formatted cell into YYYY-MM-DD, with the time added when there is one, so they suit any request that involves arithmetic. Displayed text rewrites dates only for the two built-in short formats, m/d/yy and m/d/yy h:mm; a cell formatted as 21-Jan-2025 keeps exactly that text. General-format numbers are a quiet difference between the two: displayed text shows them rounded to about ten significant digits, as a cell of normal width would, while stored values keep up to fifteen.
What the cut note tells the model
When the row limit cuts a sheet, the note gives the number of rows shown and the number in the sheet, counted from the first row below the header to the last row with text. When the column limit cuts it, the note names the first and last columns that were left out, using the sheet's letters. When the sheet's used range runs past row 2,101, the note says how far the file says it runs and that rows below 2,101 were not read, because the tool cannot know what is down there.
Leave the note in the prompt. Without it, a model asked for a total will happily add up the 200 rows it can see and present the result as the total for the sheet.
Frequently asked questions
Does it read formulas?
No. Each formula cell gives the value Excel saved for it. If the workbook was saved with calculation set to manual, those values may be out of date; recalculate and save in Excel first.
How are merged cells handled?
The merged value appears once, in the top-left cell of the range, and the other cells of the merge are empty in the table. Markdown has no way to span cells, so the empty cells are the honest result.
Can I convert a .csv file here?
Not on this page, which needs a workbook. A CSV dropped here is turned away with a link to the CSV to Markdown tool.
Why do the sheet figures not add up exactly to the total?
Each sheet's figure is estimated from that sheet's block on its own and rounded, while the total is estimated from the joined output, which also contains the blank lines between sheets. The sum and the total can therefore differ by up to about one token per sheet. All of these numbers come from character and word counts; the tokenizer of the model you paste into may treat the pipes and dashes of a table quite differently from words.
Where is the workbook processed?
In the open tab. The browser hands the file straight to the page and SheetJS parses it there. The page fetches the SheetJS code from this site the first time it needs it, and the workbook's contents are never part of any request.