Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Save an Excel File as HTML

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can save an Excel workbook as an HTML file in a few clicks using the Save As dialog: open the file, go to File > Save As (or File > Save a Copy on newer versions), choose Web Page or Single File Web Page from the file type list, pick a destination, and click Save. The result is a page you can open in any browser, email, or upload to a website. The process is quick, but the output is not a perfect copy of your workbook, so it pays to know what Excel keeps and what it drops before you commit.

What You'll Need

  • Excel for Windows or Excel for Mac with the workbook you want to convert. The desktop apps include the web page save options; Excel for the web does not.
  • The workbook open and free of unsaved changes you might forget. Save your spreadsheet first as an .xlsx file so you keep an original.
  • A destination folder where you can find the output later, since Excel can generate a small folder of supporting files next to the HTML page.
  • A modern browser to check the result, such as Chrome, Edge, Firefox, or Safari.
  • Optional: a text editor or web editor if you plan to clean up the markup before publishing.

Step-by-Step

  1. Save the workbook as a normal Excel file first. Press Ctrl+S on Windows or Cmd+S on Mac. This keeps your working copy intact so the HTML export never becomes your only version. Excel's HTML export flattens formulas and formatting, and there is no reliable way back from HTML to a working spreadsheet.
  2. Decide which sheet or range you want. Excel exports the active sheet by default when you save as a web page. If you want a specific range, select those cells first. If you want the whole workbook, see the next step about the Entire Workbook option.
  3. Open the Save As dialog. Go to File > Save As. On versions of Excel that show a backstage view with Save a Copy, use that instead. On Windows you can also press F12 from the spreadsheet to jump straight to the Save As dialog. Menu labels vary slightly between versions, platforms, and regions, so look for the option that lets you choose a file type.
  4. Pick where to save. Choose a local folder rather than a cloud location if you want to inspect the supporting files. Saving to OneDrive or SharePoint works, but the extra files may sync into folders you did not expect.
  5. Change the file type. Open the Save as type dropdown. Choose Web Page (*.htm; *.html) for a standard HTML file with a companion folder, or Single File Web Page (*.mht; *.mhtml) for one self-contained file. On Excel for Mac, look for Web Page (.htm) in the Format dropdown.
  6. Check the action buttons. In the classic Save As dialog, click the Change Title button to set the page title that appears in the browser tab. Click Publish or Save entire workbook depending on what you want: Publish exports the selected item, while the whole-workbook option exports every sheet as separate pages linked together.
  7. Name the file and save it. Type a name, then click Save. If Excel warns about compatibility or about the companion folder, accept. A typical result is a file called something like report.htm plus a folder called report_files containing stylesheets, images, and supporting scripts.
  8. Open the HTML in a browser. Double-click the .htm file or drag it into a browser window. Check that tables, colors, and any images survived, and confirm that text you expected on other sheets is either present or intentionally left out.
  9. Keep the companion folder with the file. If you chose Web Page rather than Single File Web Page, the HTML file references the extra folder. Moving the .htm without the folder breaks images and formatting.
  10. Clean up if needed. The exported HTML is verbose, with old-style table markup and inline styles. For a simple page this is fine. For a website, you may want to open the file in an editor and tidy the markup, or import it into a site builder.

Common Mistakes

The biggest mistake is saving as HTML as the only copy. HTML is a one-way export: formulas become their calculated values, macros disappear, and re-opening the page in Excel does not restore the workbook. Always keep the .xlsx original.

Second, people move the .htm file without its companion folder and then wonder why the page looks unstyled or has broken images. Copy both together, or use Single File Web Page to avoid the folder entirely.

Third, exporting the wrong sheet. Because Excel saves the active sheet by default, a workbook with many tabs can quietly export only the one you were looking at. Switch to the right sheet before starting, or choose the entire-workbook option.

Fourth, assuming hidden rows, hidden columns, and filter states will export the way they look on screen. What you see depends on the option you choose, and hidden content sometimes ends up included. Unhide or remove anything you do not want published before exporting.

Finally, publishing sensitive data. An HTML page is a text file that anyone can open and read, including notes, hidden columns, and comments that were not visible. Review the workbook for anything confidential before you export, especially if the file will go on a website.

Tips

Format the sheet for the screen before exporting. Set reasonable column widths, wrap long text, and avoid tiny fonts. A spreadsheet layout that works at print size often looks cramped in a browser.

Use Single File Web Page when you need to email the result. One file is easier to attach and cannot be broken by a missing folder, though not every editor or site builder opens .mht files well.

If you only need a table, consider saving as a CSV or copying the range into a document instead. HTML export is heavier than it needs to be for a simple grid of numbers.

Name files without spaces or special characters if the page will be uploaded to a web server. Hyphens and underscores are safer than spaces.

Test the exported page in more than one browser and at a narrow window width. Old Excel HTML relies on fixed table widths, which can overflow on phones.

Troubleshooting

The file type option is missing. You are probably in Excel for the web, which does not offer HTML export. Open the workbook in the desktop app on Windows or Mac and try again. If the desktop app also lacks the option, check that you are in a normal workbook save dialog and not the print or export panel.

Images are broken or the page is unstyled. The companion folder was moved, renamed, or deleted. Restore it next to the HTML file with its original name, or re-export as a Single File Web Page.

Only one sheet appeared. Excel saved the active sheet. Go back, select the sheet you want, or use the whole-workbook option in the Save As dialog.

Columns are cut off or text runs together. Widen columns and adjust row heights in Excel before exporting, then re-save. The browser honors the widths Excel records at export time.

Numbers look wrong. Check formatting before export, particularly percentages, dates, and currency, since display formatting is baked into the HTML as text.

Frequently Asked Questions

Does saving as HTML keep my formulas?

No. The exported page shows the calculated results as static text. Formula logic stays in the original workbook only.

Can I open the HTML file back in Excel and get my spreadsheet?

You can open it, but you get a table of values, not the original workbook with formulas, styles, and multiple sheets. Treat the export as final and keep the .xlsx file.

What is the difference between Web Page and Single File Web Page?

Web Page creates an HTML file plus a folder of supporting files. Single File Web Page packs everything into one .mht file that is easier to move but less compatible with some tools.

Does Excel for the web let me save as HTML?

No. Use the desktop version of Excel to export HTML.

Can I edit the exported page?

Yes. It is ordinary HTML, so you can open it in any text or web editor and change the content or styles.

Will charts and images come across?

Usually yes, as images referenced from the companion folder. Complex interactive elements such as slicers and pivot controls do not transfer as working features.