Convert workbooks to HTML format

Excel 365
The default file format for files created in Excel for Microsoft 365 is the .xlsx format. You can easily save a workbook, spreadsheet, or even selected area in various formats such as .xls, PDF, HTML, etc. See also how to save workbook in .xls format or PDF format.

Note that the Save As Web Page function produces a lot of extra code. We recommend using third-party applications or websites to convert the Excel workbook or spreadsheet to clean HTML.

If you create a graphic in Excel using Shapes, SmartArt, or WordArt, you can save the graphic as a separate file for use in another program. Unfortunately, Excel doesn't provide a direct way to export graphics, but here's a useful trick – save the file as a Web page.

If you want to convert an Excel workbook or spreadsheet to the HTML format, you can save it using the Save As pane or the Save As dialog box that provides more options.


Using the Save As pane (simplest way)

In the File tab, click Save As (or Save a Copy, if you open the document from any non-local storage), then from the File type drop-down list:

  • Select Single File Web Page (*.mht, *.mhtml) to create a MIME HTML file that contains all required files,
  • Select Web Page (*.htm, *.html) to create a static web page with external files:
Save as Web Page in Excel 365

Note: After clicking the Save button, Excel may warn about the impossibility to keep all Excel functionalities in the Web format:

Microsoft Excel message in Excel 365

For example, the entire workbook is saved as an HTML:

Example of the Web page in Excel 365

Using the Save As dialog box

In the File tab, click Save As, then click Browse to open the Save As dialog box (see how to open Save As dialog box).

In the Save As dialog box:

  • From the Save as type list, select the Web Page type:
    Save as Web Page in Excel 365
  • If you want to create an HTML page with all sheets, leave the Entire Workbook option selected. You can select the Selection option if you have selected an area or prefer to include only one sheet in the HTML file.
  • Click the Publish... button to specify sheets, the selected area, etc. In the Publish as Web Page dialog box:
    • From the Choose dropdown list, choose what you want to include into Web page: Entire workbook, data range, or some sheet:
      Publish as Web Page dialog box in Excel 365

      For some items, Excel allows you to specify additional selections. For example, if you choose the Range of cells option, you can specify data range:

      Range of cells in Publish as Web Page dialog box Excel 365
    • Click the Change... button to specify the Web page title if you prefer something other than the name of the Excel workbook.
    • Click the Browse... button to change the Web page location.
    • Select the AutoRepublish every time this workbook is saved checkbox to create an automatically updated Web page.
    • Select the Open published web page in browser checkbox to open an HTML file after creation.

For example, only one sheet of the workbook is saved as HTML:

Example of the Web page 2 in Excel 365

HTML file and its folder

After clicking the Save or Publish button, in the selected location, Excel creates an HTML file and the new folder with all pictures from the specified area:

HTML file and the folder in Excel 365
The folder of HTML file in Excel 365

Notes:

  1. Some charts, images, and other objects can be created twice in the original and compressed or cropped formats, as shown in the spreadsheet.
  2. When you delete the HTML file in Explorer, the corresponding folder is removed automatically.

Please, disable AdBlock and reload the page to continue

Today, 30% of our visitors use Ad-Block to block ads.We understand your pain with ads, but without ads, we won't be able to provide you with free content soon. If you need our content for work or study, please support our efforts and disable AdBlock for our site. As you will see, we have a lot of helpful information to share.