To save an Excel spreadsheet as a web page, go to File > Save As, choose your location, and select Web Page (.htm; .html) from the Save as type dropdown menu. This process converts your structured data into HTML code, allowing anyone with a web browser to view your tables and charts without needing the Microsoft Excel application installed on their device. It is an effective way to share static reports, price lists, or schedules on a local network or a public website.

What You'll Need

  • A computer with Microsoft Excel installed (Windows or macOS).
  • A completed spreadsheet that is formatted and ready for publication.
  • Administrative permissions to save files to your chosen destination folder.
  • A web browser (such as Chrome, Firefox, Edge, or Safari) to verify the final output.

Step-by-Step

  1. Prepare Your Data: Before exporting, ensure your spreadsheet is clean. Remove any unnecessary empty rows or columns, as these will be rendered as empty space in the HTML version. Apply borders to your cells if you want them to appear as a visible table on the web page, as some default web styles may hide gridlines.
  2. Open the Save As Menu: Click on the File tab in the top-left corner of the Excel ribbon. From the sidebar menu, select Save As. Depending on your version of Excel, you may need to click Browse to open the classic Windows Explorer or macOS Finder dialog box. Note that menu labels may differ slightly based on your specific version, device, or region.
  3. Choose Your Destination: Navigate to the folder where you want to store the web page. It is highly recommended to create a dedicated new folder for this project. When Excel saves a file as a web page, it creates the .html file and a secondary folder containing all the supporting files (CSS, images, and formatting scripts). If you save it to a cluttered directory, these supporting files will be mixed in with your other documents.
  4. Select the File Format: Click the Save as type dropdown menu (located below the file name field). Scroll through the list and select Web Page (.htm; .html).
  5. Define the Save Scope: After selecting the web page format, you will see two radio buttons: Save the entire workbook and Save sheet.
    • Selecting Save the entire workbook creates a web page for every tab in your file, with navigation links at the top to switch between them.
    • Selecting Save sheet only converts the currently active tab into a web page.
  6. Configure Publishing Options: Click the Publish button located next to the save options. This opens the Publish Web Page dialog box. Here, you can specify the exact cell range you want to export (e.g., A1:G20) instead of the whole sheet. You can also check the box for Auto repost, which allows Excel to update the web page automatically whenever you save changes to the original spreadsheet.
  7. Finalize the Save: Click Publish or Save. Excel will generate the HTML file and the associated folder.
  8. Verify the Output: Navigate to the folder where you saved the file. Double-click the .html file to open it in your default web browser. Check that the formatting is correct and that all data is visible.

Common Mistakes

One of the most frequent errors is neglecting the supporting folder. Users often move the .html file to a different folder or upload it to a server without moving the accompanying folder (usually named something like "filename_files"). When this happens, the web page will lose all its formatting, colors, and images, appearing as a plain, unstyled text table. Always keep the HTML file and its folder together in the same directory.

Another common mistake is failing to set a specific print area or cell range. If you have a massive spreadsheet with thousands of rows of raw data, saving the entire sheet as a web page can result in a massive HTML file that loads slowly or crashes the browser. It is always better to define a specific range of cells that contains only the final report or summary you intend for the audience to see.

Users also often forget that Excel web pages are static. Unless you are using a shared network drive with the "Auto repost" feature enabled, changing the original Excel file will not automatically update a web page that has already been uploaded to a web server. You must re-save and re-upload the file to reflect new data.

Tips

To make your web page look more professional, use Excel's Format as Table feature before exporting. Tables with banded rows and clear headers translate much better into HTML than raw cells with manual shading. This ensures that the browser recognizes the data structure correctly.

If you only need to share a small snippet of data, consider using the Copy as Picture feature and then inserting that image into a web page, or using the Save as PDF option if interactivity isn't required. HTML exports are best when you want the user to be able to highlight and copy text from the table.

For those who want a truly dynamic web experience, consider using OneDrive or SharePoint. Instead of saving as a static HTML file, you can use the Embed feature found under File > Share > Embed. This creates an iframe that displays the live Excel workbook on a website, allowing for real-time updates and better interactivity than a standard .html export.

Troubleshooting

If the web page looks distorted or the columns are overlapping, the first step is to check your column widths in Excel. Web browsers handle column widths differently than the Excel desktop app. Try widening your columns slightly more than necessary in Excel before exporting to provide a buffer for browser rendering.

If you cannot find the Save As options for web pages, ensure you are using the desktop version of Excel. The web-based version of Excel (Excel for the Web) does not have a direct "Save as Web Page" feature; it uses the "Embed" or "Share" functions instead. If you are on the desktop app and the option is missing, check if your file is in a restricted format (like a read-only CSV) and save it as a standard .xlsx file first.

If the browser shows a "File Not Found" error for images or styles, check the folder structure. Ensure the folder containing the supporting files has not been renamed. The HTML file looks for a folder with a very specific name; if you rename that folder, the link is broken. To fix this, delete the exported files and perform the save process again without renaming the resulting folders.

If the file size is too large for your web host, go back to the Publish options and limit the range of cells being exported. Removing unnecessary formatting, such as heavy borders or complex conditional formatting, can also reduce the size of the generated HTML and CSS files.

Frequently Asked Questions

Can I edit the web page after saving it?

You cannot edit the web page directly within Excel. You must make the changes in the original .xlsx file and then save it as a web page again to overwrite the previous version.

Will my Excel formulas work on the web page?

No. The web page displays the calculated values of your formulas, not the formulas themselves. The end user will see the result, but they cannot see or edit the logic behind the numbers.

Is the web page password protected?

No. Saving as a web page removes the password protection of the Excel file. Anyone who has access to the .html file can view the data. If the data is sensitive, do not export it as a web page or ensure the destination folder is secured.

Does this work on a Mac?

Yes, the process is similar on macOS, though the interface for the Save As dialog may look different. Look for the "File Format" dropdown menu to find the HTML option.

Can I save only a specific range of cells?

Yes. In the Publish menu, you can select the "Selection:" radio button and enter the specific cell range (e.g., A1:C10) that you wish to export.

What is the difference between .htm and .html?

For all practical purposes in modern browsers, there is no difference. .htm is a legacy extension from older versions of Windows, while .html is the standard. Excel supports both.