How to Embed Google Sheets in WordPress: Tutorial & Plugins

How to Embed Google Sheets in WordPress: Tutorial & Plugins

Struggling with how to embed Google Sheets in WordPress?

While there are lots of useful WordPress table plugins that help you add tables on your site, sometimes you just need the full flexibility of Google Sheets and it’s better to embed your table directly from Google Sheets.

This ensures that your spreadsheet data is always up-to-date and, for large spreadsheets, it takes the processing responsibilities off your WordPress site’s server.

Thankfully, it’s pretty easy to embed Google Sheets in WordPress – and in this post, I’ll show you exactly how to do it.

I’ll give you a few different options, ranging from the simplest solution of embedding directly from Google Sheets to some Google Sheets WordPress plugins that offer some interesting possibilities, including importing data from Google Sheets to a self-hosted table on your site.

Let’s dig in!

How to Embed Google Sheets in WordPress

In this first section, I’ll show you how to use the built-in Google Sheets embed option to add your spreadsheet to WordPress. This method doesn’t require the use of any plugins – all you do is generate the embed code from the Google Sheets interface and then add it to the WordPress editor.

For this tutorial, we’ll assume that you’ve already created the spreadsheet that you want to embed. If not, do that first and then come back here for the WordPress-specific parts.

For this example, I’ve created a simple spreadsheet with some random financial dummy data. Now, let’s embed it in WordPress.

1. Generate Google Sheets Embed Code

To get started, you’ll be working in the Google Sheets interface – make sure to open the spreadsheet that you want to embed.

In the Google Sheets interface, open the File menu and choose Publish to the web:

Publish Google Sheets

This will open a popup interface. Go to the Embed tab in that popup and choose whether you want to embed that entire document or just an individual sheet (useful if you have multiple sheets but only want to include one of them on your WordPress site.

If you expand the Publish content & settings area, you’ll also get an option to decide whether or not to “republish” your spreadsheet when you make changes to the existing document:

  • If you leave the box checked, your embedded spreadsheet will always be in sync with what you see in the Google Sheets interface. As soon as you change something, that change will automatically update on your WordPress site.
  • If you uncheck the box, you’ll need to manually republish your spreadsheet when you want to update its data. Otherwise, the embedded version on WordPress will basically just be a snapshot of the spreadsheet’s current version.

Once you’ve made your choices, click Publish:

Choose web version

Once you do that, you should see an embed code. Keep this embed code handy because you’re going to need it in the next step:

Copy embed code

2. Add Google Sheets Embed Code to WordPress

Next, go to your WordPress dashboard and create a new post or page where you want to embed your spreadsheet (or edit an existing piece of content).

If you’re using the WordPress block editor, you can add a Custom HTML block and then paste the Google Sheets embed code into that block. If you switch to the Preview setting, you should see your embed right there in the editor (though it might look a little weird on the backend)

Add embed code to HTML BLock

If you’re using the Classic TinyMCE editor, you can paste the embed code in the Text tab of the editor (not the Visual tab).

When you publish/update the post, you should see the embedded Google Sheets document on the front-end. As you can see, my spreadsheet is rather wide, so it looks a bit awkward on the front-end:

Small interface

To fix that, you can add height and width parameters to the embed code. For example, I’ve set width=”100%” (this makes it take up the full width of your content area) and height=”500″ (500 px – you can adjust this according to your needs):

Add height and width parameters to embed Google Sheets in WordPress

And with those parameters added to the embed code, it looks much better:

Proper way to embed Google Sheets in WordPress

Best WordPress Google Sheets Plugins

While the manual embed method that I detailed above works for some situations, you might have other situations in which you’d prefer to use a Google Sheets WordPress plugin.

Depending on which plugin you choose, you’ll be able to create a better user experience, automatically import (and sync) Google Sheets to WordPress and more.

Let’s go over some of the top options…

Inline Google Spreadsheet Viewer

Inline Google Spreadsheet Viewer is a popular free plugin that lets you embed an inline PDF viewer using a simple shortcode-based system. This is useful if you don’t want to embed the entire Google Sheets interface and would prefer to use this plugin’s spreadsheet viewer.

This also opens up the ability to add your own CSS, which gives you full control over how your spreadsheet looks.

The plugin is well-documented, so you can check out the many options at its WordPress.org listing page.

Get Inline Google Spreadsheet Viewer

wpDataTables

If you only care about your spreadsheet’s data but you don’t actually need the Google Sheets interface, wpDataTables could be a good option. It’s a popular WordPress table plugin that lets you easily import data from Google Sheets into a self-hosted table. The neat thing is that it also gives you an option to automatically sync this information with Google Sheets.

So as you update the original source spreadsheet in Google Sheets, you can still sync those changes to the self-hosted version on your WordPress site.

It’s a premium plugin that costs $59. To learn more and see it in action, check out our full wpDataTables review.

Get wpDataTables

TablePress

TablePress is a popular free WordPress table plugin. With the Automatic Periodic Table Import extension, you can automatically import Google Sheets to WordPress on a schedule of your choosing.

All you need to do is create a CSV export URL for Google Sheets and add that to TablePress. To do that, go to File → Publish to the web in the Google Sheets interface and choose CSV under the Link section.

Get TablePress

Visualizer

Visualizer is another popular WordPress table/chart plugin. With the free version, you can one-time import Google Sheets to WordPress. And if you upgrade to the premium version, you’ll also be able to automatically sync your table to the spreadsheet to keep the data updated.

Visualizer’s free version is available at WordPress.org and the premium version starts at $59.

Get Visualizer

Essential Addons for Elementor

If you’re using the popular Elementor page builder (which is what we use and recommend here at WPLift), the third-party Essential Addons for Elementor plugin includes a widget that lets you import Google Sheets data into a table in your Elementor designs.

Check out a demo here or view the documentation.

Essential Addons costs $39.97.

Get Essential Addons

Embed Google Sheets in WordPress Today

If you want the simplest way to add Google Sheets to WordPress, you can publish your spreadsheet to the web and add the embed code anywhere on your WordPress site.

Or, if you only care about the Google Sheets data (and not the Google Sheets interface itself), you might prefer to go with a Google Sheets WordPress plugin that lets you import the data from your spreadsheet to your WordPress site.

Depending on which plugin you choose, you’ll even be able to periodically sync your site with Google Sheets to keep data up-to-date.

Still have any questions about how to add Google Sheets to WordPress? Leave a comment and we’ll try to help!

Keep reading the article at Learn WordPress with WPLift. The article was originally written by Colin Newcomer on 2020-12-23 02:00:29.

The article was hand-picked and curated for you by the Editorial Team of WP Archives.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

Your email address will not be published. Required fields are marked *

Show Your ❤️ Love! Like Us
Scroll to Top