How to Embed Excel (or Google Sheets) Tables into HTML

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on August 12, 2022

This tutorial will demonstrate how to embed Excel or Google Sheets tables into HTML.

 

html intro

 

Save Excel File as HTML

  1. With the workbook that you wish to save as an HTML file open in Excel, in the Ribbon, select File > Save As.

 

html saveas

 

  1. From the drop-down list below the file name, select Web Page (*.htm, *.html) and then click Save.
  2. The file will then be saved as an HTML file. Switch to the Windows Explorer to view the HTML file.

 

html savedfile

 

  1. Double-click on the HTML file to open it in the default browser.

Embed Excel Sheet With Office Live

Excel on Office Live can be more flexible, as it creates a link.

  1. Log onto Office 365 in the browser with Office Live and select the Excel Icon.

 

embedhtml office

 

  1. Select New blank workbook to create a new workbook.

 

embedhtml-officelive

 

  1. Fill in the worksheet as needed, and then, in the Ribbon, select File > Share > Embed.

 

embed html embed

 

  1. Click Generate to generate the HTML code.

 

embedhtml-generatehtml

 

  1. In the Ribbon, click once again File > Share > Embed.

 

embedhtml javascript

 

A form will open showing the layout of the embedded Excel worksheet. Amend accordingly, and the copy the Embed Code (which is in JavaScript) into the required web page to embed the Excel file into that web page.

Embed Google Sheets Tables Into HTML

Once you’ve created a Google Sheets file, you can publish it to the web and share the sheet with multiple users by sending the users a link to the sheet itself.

  1. In the File menu, select Publish to the web.

 

html gs publilsh

 

  1. Select from either Link or Embed.

 

html gs publish to web

 

  1. Select either the Entire Document, or the sheet required.

 

html gs select sheet

 

  1. Click Publish.

 

html gs link

 

You can now send the generated link to any users you want to open the file on the web.

  1. To remove the file from the web, select Published content and settings > Stop publishing.

 

html gs stop publishing

 

  1. Click OK on the Google message that pops up to remove the document from the web.

Note: If you had selected Embed, it would have generated HTML code to included in your own web site or blog. This HTML code would then embed the Google Sheets data into your website.

AI Formula Generator

Try for Free

See all How-To Articles