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

AspectExcel (workbook)HTML (table markup)
NatureSpreadsheet file with structure and stylesText markup describing structure and semantics
StylingFonts, fills, borders embedded in the fileUnstyled by default; CSS owns presentation
Merged cellsNative supportExpressed with rowspan/colspan
FormulasSupportedNot supported — static text only
InteractivitySorting, filtering, pivot tables, macrosStatic; interactivity needs JavaScript
AccessibilityPlatform dependent, usually middlingSemantic tags read correctly by screen readers
CrawlabilityMust be downloaded to be readCrawled and indexed directly
PortabilityNeeds Excel/WPS to openRenders 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