Excel to HTML Table (XLSX, XLS, ODS)
Turn the table in an Excel file into HTML table code for a website or email; merged cells are kept
Your files stay with you. Conversion happens inside the browser; no file is ever uploaded to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
Tap or click the "Select an Excel file" box and pick your .xlsx, .xlsm, .xls or .ods file; press "Convert to HTML" and an .html file downloads. Double-click it to see the table in your browser, or open it in Notepad (TextEdit on a Mac) and copy the <table> code inside. Cells you merged in Excel are written as colspan and rowspan; a heading merged across A1 and B1, for example, becomes one cell spanning two columns. Cells hold the result Excel displays, not the formula: a date shown as 3/15/2023 and an amount shown as 1,250.50 come through the same way. Empty rows and columns at the end are dropped. Choose "All sheets" and each sheet becomes its own table under a heading with the sheet's name. For email, or anywhere that ignores stylesheets, keep "With borders"; the style is written into every cell. Remove the password from a protected workbook in Excel and save it before converting.
This tool is also known as excel to html, excel to html table, xlsx to html, convert excel table to html, excel to html converter, spreadsheet to html table.
What is colspan and rowspan?
colspan and rowspan are attributes that tell an HTML table cell how many columns and rows it covers. <td colspan="2"> draws a cell two columns wide, <td rowspan="3"> a cell three rows tall. They are the HTML counterpart of Excel's "Merge & Center" command. The covered cells must not be written separately; if they are, the table shifts and values land under the wrong columns. This tool reads Excel's list of merged ranges and writes both attributes for you.
What is XLSX?
XLSX is the workbook format Excel has used since 2007. It is actually a ZIP package of XML files: each sheet, the shared strings, the number formats and the list of merged cells sit in separate files. A cell's value and its appearance are stored apart; a date is a day count inside, and the way it is written on screen comes from its format code. The older binary .xls format and LibreOffice's .ods carry similar information and are read by this tool too.
What is the difference between converting Excel to HTML and to CSV?
CSV only lists cell values separated by a delimiter; it carries no merged cells, no heading row and no multiple sheets, and it exists to move data into another program. An HTML table exists to be shown in a browser: it keeps merged cells through colspan and rowspan, sets the heading row apart, can turn each sheet into its own titled table, and can carry looks such as borders. Choose CSV to load the data into another system and HTML to show it on a page or in an email.
Why dates and numbers look the way they do in Excel
Excel stores a date as a day count such as 45000 and an amount as a raw number such as 1250.5; the 3/15/2023 and 1,250.50 you see on screen come from the cell's format. Excel's built-in "Short Date" format is not even stored as a pattern in the file; it follows the computer's regional settings. Many libraries decode it with a fixed US pattern (3/15/23).
This tool reads each cell's own format, writes the built-in short date in the page's language and adjusts the thousands and decimal separators to match. The table therefore looks in HTML the way it looks in Excel. Formulas are written as their calculated results; the formula itself is not carried into the HTML.
- 45000 (date format) → 3/15/2023
- 1250.5 (#,##0.00 format) → 1,250.50
- A1:B1 merged → <th colspan="2">
Which setting to use when
For your website or a blog post, choose "Plain HTML"; your theme draws the table in its own colours. For a newsletter, a quote email or any system that ignores stylesheets, keep "With borders": Gmail and Outlook strip separate style blocks, so borders and padding are written into every cell.
If months or branches sit on separate sheets of the workbook, choose "All sheets"; you get one file with several tables, each under its sheet name. If your first row is not a heading row, for example the data starts right away, set "What is the first row?" to "Data". Excel formatting such as font colour, fill colour and typeface is not carried over; only the content and the merged-cell layout are.
Frequently asked questions
How do I convert an Excel table to HTML?
Select your Excel file on this page and press "Convert to HTML"; an .html file downloads. Open it in your browser to see the table, or open it in a text editor and copy the code that starts with <table> into your site.
Are merged cells kept?
Yes. Cells merged across columns become colspan, cells merged down rows become rowspan, and the other cells covered by the merge are left out of the table. The result line tells you how many merged cells the file had.
Do Excel colours and fonts come along?
No. The tool carries the cell content and the merged-cell layout; font colour, fill colour, typeface and column width are not transferred. You can pick a tidy bordered look or let your site's own table style apply.
Is my Excel file uploaded to a server?
No. The file is opened and converted to HTML in your browser; even a payroll sheet or customer list never leaves your device.