Excel to HTML

Data

Convert Excel to clean, styled HTML tables with sheet selection and responsive output. Pick a sheet keep merged cells Choose which sheet to export Pick.

No file chosen

About Excel to HTML

This Excel to HTML converter uses SheetJS to transform xlsx and xls spreadsheets into styled HTML tables locally in your browser. The conversion preserves cell data types, merged cells (colspan/rowspan), alignment, and basic formatting, generating semantic table, thead, and tbody structures. The output includes responsive styling and can be embedded in web pages, email templates, or documentation systems. It is worth understanding the boundary of what conversion handles: embedded images, charts, conditional formatting, and elaborate fonts do not survive. What does survive is the cell values, merged layout, and coarse alignment, which makes this ideal for turning a structured data sheet into a long, web-friendly table. If the source contains formulas, confirm the computed results are what you expect before converting, because SheetJS reads the calculated result rather than the formula itself. Custom CSS class names help the table melt into an existing site's design system without re-styling by hand. Merged cells are the first obstacle. In a spreadsheet a merge only affects display and the covered cells still exist, usually empty, while a web table expresses a merge with row and column span attributes. Ignoring that mapping degenerates the merged region into blank cells and loses the structure. Check for merges first and map them explicitly. Style and content need separating, the second easily missed boundary. Background colours, borders and conditional formatting have no direct counterpart in a web table, so an export typically keeps values only. To preserve appearance, export structured data and let a stylesheet render it rather than hardcoding formatting into the markup, whose maintenance cost grows quickly with every redesign. Against a plain data format, a web table wins on readability and direct embedding: paste it into a document or an e-mail and it displays, with no spreadsheet software required. The cost is size, which inflates noticeably with many rows and columns. Use it as a presentation artefact and choose a data format wherever numbers still need processing. Escaping is the security-critical step. A cell containing angle brackets, an ampersand or a quote written into markup unescaped is parsed as a tag, which at best garbles the display and at worst creates an injection risk when the page is rendered. Escape the characters, then spot-check a cell containing special characters to confirm it appears as text. Finally, fix row order and header handling in the process. Whether the first row is a header, whether hidden rows and columns are kept, and whether the table needs a caption all change the artefact produced from the same data. Recording those choices lets the recipient understand the output and avoids repeated confirmation later. A large table needs extra browsing design once exported. Beyond a few dozen rows, laying it out in full forces horizontal scrolling and the experience degrades quickly; fix the header, allow vertical scrolling, or provide export and search entry points. The test is whether a reader must read everything or only confirm a few rows, the latter suiting a filterable view rather than a full static table. This is not equivalent to a spreadsheet "save as web page", and the difference is worth keeping clear. That export usually bundles styles and scripts, which is heavy and hard to fold into an existing page, while exporting data and rendering it yourself yields clean table markup that drops into an existing layout. When embedding into a live site, take the second route and keep control of the styling.

How It Works Internally

Conversion maps cells onto a table structure, so the row and column relationships come from the sheet, and merged cells are the main exception: a merge spanning several rows or columns requires row and column span attributes in the markup, while the covered cells appear empty and are lost if emitted directly. Rich formatting is also dropped, leaving only values.

InputA title row merged across A1:C1
Output<th colspan="3"> (expressed with a column span; the covered B1 and C1 are empty in the source)

Measured on This Page

Fixed: CSV mojibakeThe old build handed the CSV byte array to SheetJS (type:'array'), which maps bytes through CP1252 — 北京 became å京. Text files are now decoded to a string first: strict UTF-8, falling back to GB18030 for the GBK exports older Chinese Excel produces, with the BOM stripped
Structure3 rows (header plus 2) by 3 columns = 9 cells
Escapinga<b>&c inside a cell is emitted as &lt;b&gt; entities — no raw tag injection into the table
Legal fragmentOnly <table>…</table> is injected, with no <html>/<meta>/<title> — the old build put meta/title inside a div and produced invalid DOM, as the code comment records
Header semanticsThe first row renders as the header (cells carry data-t/data-v from sheet_to_html)

Two easy-to-miss traps: CSV encoding — Chinese CSVs come as UTF-8 (with or without BOM) or GBK/GB18030, and handing bytes straight to a parser most often yields mojibake like 北京 → å京; and injection legality — SheetJS's sheet_to_html returns a whole HTML document, so pasting it into v-html buries meta/title inside a div and breaks the DOM, which is why only the table fragment is taken. Also note merged cells, formulas and date formats degrade to text or blanks in an HTML table — read the original sheet when fidelity matters.

How this was measured: A CSV containing Chinese and HTML metacharacters (name,city,note / Alice,北京,"a<b>&c" / Bob,NY,"x,y") was uploaded, then row count, cell count, entity escaping, CJK preservation and fragment legality were checked, before and after the fix. · Measured 2026-10-31

How to Use

  1. Open "Excel to HTML"
  2. Click "Choose file" and upload an xlsx, xls or csv
  3. Switch sheets in the dropdown when the workbook has several
  4. The table preview and HTML are generated automatically
  5. Click "Copy HTML" to take the table markup

Use Cases

  • Web data publishing — Convert Excel reports to HTML tables for direct embedding in company intranets or CMS systems.
  • Email template creation — Transform Excel price lists into HTML tables for marketing emails, compatible with email clients.
  • Documentation import — Convert Excel data tables to semantic HTML structures for import into Confluence or Notion.
  • Data preview — Convert Excel data to HTML tables for quick preview without installing Excel software.
  • Report automation — Convert periodic Excel reports to HTML for embedding in dashboard pages for automated data display.
  • Static site publishing — Turn shared pricing or catalog sheets into static HTML tables so each page does not need separate proofing.

FAQ

Are merged cells preserved after conversion?

Yes. The tool converts Excel merged cells to HTML colspan and rowspan attributes, maintaining consistent table layout.

Can the output HTML be used directly?

Yes. The generated HTML includes semantic table, thead, tbody structures and basic styling, ready to paste into web pages or email editors.

Does it support custom styling?

Yes. You can customize CSS class names to replace defaults and modify alignment, borders, and background color properties.

Can it handle cells with formulas?

Yes. SheetJS reads formula result values rather than formulas; the HTML table displays computed values, so verify them before publishing.

Are embedded images or charts converted?

No. Rich objects such as images, embedded charts, and conditional formatting do not become table content; only data values, merged layout, and basic alignment carry over.

Are the files uploaded?

No. All parsing and conversion run locally via SheetJS; your file never leaves the device, so sensitive reports can be handled safely.

The generated HTML table looks unstyled and plain?

The tool emits semantic <table> markup (thead/tbody) without styles so you can apply your own CSS. Wrap it in a styled component or paste into a rich-text editor, which applies its own defaults and usually looks fine.

Merged cells do not survive the conversion?

HTML expresses merges with rowspan/colspan, which the tool emits. If you want a plain data table, unmerge in Excel first. To keep the visual merge, verify rowspan/colspan are present — browsers render them correctly.