Excel to HTML: Differences, Edge Cases & Pitfalls
Export Excel sheets as semantic HTML tables with thead structure and merged cells expanded into rowspan and colspan.
Turning a worksheet into a web table should produce semantic markup, not a styling snapshot. Two things decide whether screen readers and crawlers can read it: merged cells expanded into proper rowspan/colspan, and the header row living inside thead.
Format Differences
| Aspect | Excel (workbook) | HTML (table markup) |
|---|---|---|
| Nature | Spreadsheet file with structure and styles | Text markup describing structure and semantics |
| Styling | Fonts, fills, borders embedded in the file | Unstyled by default; CSS owns presentation |
| Merged cells | Native support | Expressed with rowspan/colspan |
| Formulas | Supported | Not supported — static text only |
| Interactivity | Sorting, filtering, pivot tables, macros | Static; interactivity needs JavaScript |
| Accessibility | Platform dependent, usually middling | Semantic tags read correctly by screen readers |
| Crawlability | Must be downloaded to be read | Crawled and indexed directly |
| Portability | Needs Excel/WPS to open | Renders in any browser |
Edge Cases
- Merged cells differ most after conversion: some tools flatten the merged region and shift rows, so re-check the header by hand.
- In-cell line breaks collapse into spaces in HTML; use explicit <br> or a white-space rule.
- Tools like SheetJS/xlsx emit no <thead> — every row lands in <tbody>, so add semantic tags yourself for SEO and accessibility.
- Tables sized by column width overflow narrow viewports; wrap them in an overflow-x:auto container.
Common Pitfalls
- Pasting into a rich-text editor strips the styles and the table collapses, which looks like a failed conversion.
- Flattened merged cells turn a two-row header into a data row, scrambling every downstream statistic.
- The table overflows phone screens with no scroll container, stretching the whole page.
- Using tables for page layout — a technique from two decades ago and an accessibility disaster.
- Exported HTML keeps the data but not the column widths, so a wide sheet stretches the whole page on phones unless the table sits in a horizontally scrolling container.
Related Tools
- Excel to HTMLConvert Excel to clean, styled HTML tables with sheet selection and responsive output. Pick a sheet keep merged cells Choose which sheet to export Pick.
- Data Format ConverterConvert between JSON, YAML, TOML, XML and CSV in one place with a single paste and instant preview for seamless multi-format config and data conversion.
- Excel to CSVConvert Excel files to CSV with custom delimiter options and batch sheet conversion. Export data for databases or scripts via SheetJS, in the browser.
- Excel to JSONConvert Excel files (xlsx, xls, csv) to JSON format. Supports nested headers, sheet selection and key mapping. Choose the sheet and header row and keep numbers.