How to Embed Google Sheets in WordPress

To embed a Google Sheet in WordPress, open the sheet and click File > Share > Publish to web. Click the Embed tab, choose the whole spreadsheet or one sheet, click Publish, and copy the iframe code. In the WordPress block editor, add a Custom HTML block, paste the code, and update the post.

This guide covers the embed steps, customizing what the embed shows, keeping it current, and fixing a blank embed. The steps come from Google’s Make Google Docs, Sheets, Slides & Forms public help page and WordPress.com’s Embed from Google Docs guide.

How to Embed a Google Sheet in WordPress

  1. Open the spreadsheet in Google Sheets.
  2. Click File > Share > Publish to web.
  3. Click the Embed tab.
  4. Choose Entire Document or a single sheet.
  5. Click Publish, then confirm with OK.
  6. Copy the HTML code in the text box.
  7. In WordPress, edit the post or page and add a Custom HTML block with the block inserter (+).
  8. Paste the code, then click Preview and Update or Publish.

Result: Visitors see a read-only copy of your sheet inside the post. WordPress.com notes the embed may not look right inside the editor, so use Preview in a new tab to check it. The same Publish to web window also lets you get the embed code for a Google Slides presentation.

Card showing steps to embed a Google Sheet in a WordPress post with Publish to web and a Custom HTML block
Illustration: the steps to embed a Google Sheet in WordPress.

Publishing is not the same as sharing

This is the most common mistake: setting the sheet to “Anyone with the link can view” is not the same as publishing it. If you skip Publish to web, the embed may look fine to you because you’re signed in to Google, while visitors see a sign-in screen or an empty box.

How to Customize What the Embed Shows

Google says you can show or hide parts of an embedded spreadsheet by editing settings in the iframe’s URL on your site:

  • gid= the sheet ID, to show a specific tab.
  • range= the rows and columns to show, such as A1:B14.
  • widget= true shows the sheet tabs at the bottom.
  • headers= true shows row numbers and column letters.
  • chrome= true shows the title and footer.

To change the size, edit the width and height numbers in the iframe code. For phones, try wrapping the iframe in a container set to 100% width with horizontal scrolling, so wide sheets don’t break your layout.

Card listing Google Sheets embed URL parameters gid, range, widget, headers, and chrome
Illustration: the iframe settings that control what an embedded sheet shows.

Keeping the Embedded Sheet Up to Date

  • Automatic updates: Google says changes to the original sheet show up in the published version, though the update can take a few minutes.
  • Turn off auto-updates: in Publish to web, open Published content & settings and uncheck Automatically republish when changes are made.
  • Stop publishing: go back to Publish to web, open Published content & settings, and click Stop publishing. The embed stops working.

Privacy: What Visitors Can See

Google warns that publishing can make a file visible to everyone on the web, depending on your account settings, so don’t publish private or sensitive data. Visitors see cell values, formatting, and charts, but Google says people with view access can’t see or edit formulas. If you publish a chart, the data behind it is visible too.

Troubleshooting

  • Visitors see a blank box or a sign-in prompt: the sheet was shared but not published. Use Publish to web.
  • The embed doesn’t work on a free WordPress.com site: WordPress.com says embedding Google Docs files needs a Personal, Premium, Business, or Commerce plan.
  • Publish to web is missing: on a work or school account, Google says your administrator may have turned off publishing.
  • The embed is too small: raise the width and height values in the iframe code.

Frequently Asked Questions

Can visitors edit the embedded sheet?

No. Google says published spreadsheets appear without a toolbar, and visitors can’t edit them.

Should I use a plugin instead?

For one or two sheets, the built-in embed is enough. Table plugins can import Google Sheets data into native, searchable WordPress tables if you need sorting, filtering, or many sheets.

Related Guides

Join Our Free Newsletter

Featured guides and deals

You may opt out at any time.
Read our Privacy Policy