How to Embed Google Sheets in WordPress
In our previous articles, we talked about embedding PDF files and Word documents in WordPress. But this time round, we’d like to show you something else. We’ll share with you a tutorial on how to embed Google Sheets in WordPress.
Google Sheets are an incredibly useful, versatile, and customizable tool. They’re mostly used in accounting and for math-related tasks, but their power goes way beyond that. Thanks to the myriad of practical features they come with, Google Sheets are also a great choice when it comes to invoicing, data analysis, employee time tracking, calendars, schedules, etc. If you use them in your everyday work, there will probably come a time when you’d want to add them to your WordPress website, for visitors to see. And we’re here to help you do that.
In this tutorial, we’ll show you two ways you can use to embed Google Sheets in WordPress. You’ll discover:
If you prefer, you can check out our step-by-step video to walk you through the process, or follow our detailed instructions below.
Adding Google Sheets to your pages and posts is quite a cakewalk. You just need to obtain the iframe link and add it to your website. We’ll walk you through this process step by step.
N.B. You can follow the same steps if you wish to embed Google Docs, Google Slides, and Google Drawings in WordPress. As for Google Forms, you should use a different method which we discussed in a separate article on how to embed a Google Form in WordPress.
Publish Google Sheets
The first thing you need to do is make sure your Google Sheets are published and available for everyone to see. To do that, head over to your Google Drive and open the document you wish to embed.
In the top left corner, click on File, and then on Share, which will open a submenu where you can select Publish to web.
Next up, it’s time to publish the document. To get the iframe, it’s important to select the Embed tab.
Before you press the Publish button, you can choose whether to publish the entire document or just the individual sheets. Furthermore, all changes you make to the original sheet will be automatically republished. If you’d like to change this setting, click on Publish Content and Settings at the bottom of the box and uncheck the Automatically Republish When Changes are Made option.
Once everything’s set, you can finally press the Publish button and then get the shareable link.
Embed Google Sheets URL
To embed Google Sheets in WordPress, copy the iframe code. Then, go to your admin dashboard. Select Pages > Add New and paste the link in the text editor.
To embed it in Gutenberg, add the Custom HTML block to your page and paste the link in the HTML field.
In Elementor, you will need the HTML widget.
Simply drag and drop the widget to the desired place on the page. This will open a box in the Elementor menu to the left of the screen where you can paste your code.
And with that, you’ve successfully added a Google Sheet to your website.
By the way, if you’d like to modify the size of the sheet, you can specify its width and height within the iframe code. For example, we’d like our sheet to be 1100 px wide and 300 px tall. This is how we’ll edit the code:
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSz3eSCF1FeAWxjwwkcCprTRCIwUxHnNFPtIsOeAFZyBX_MdhSiIGPwxSHbZUfedUV_XQW6j33AyPKg/pubhtml?widget=true&headers=false" style="height:300px;width:1100px"></iframe>
Another way of embedding Google Sheets in WordPress is by using plugins.
WordPress, as a website-building platform, comes with copious amounts of built-in features that allow you to make some pretty astounding websites. But to significantly amplify the power of your site, you need WordPress plugins. Whatever action comes to your mind, you’ll most likely find a plugin made for it in the official WordPress plugin library. And embedding Google Sheets in WordPress is no different.
While you’ll get several results for your search query, in our opinion, currently the best plugin on the market is EmbedPress.
You can use it not only for adding Google Sheets to your pages, but also to embed audio and video files, posts, etc. from more than 75 sources.
EmbedPress is maintained on the regular, and tested up to the latest version of WordPress. At the moment, it has over 9k active users.
The premium version of the plugin is available as well, with the prices ranging from $49 for a single site to $299, which is a lifetime subscription that lets you use the plugin on an unlimited number of websites.
The free version of EmbedPress should suffice, though. It can do exactly what you need, and that’s to embed Google Sheets in WordPress. Other than that, it lets you embed Google docs, slides, forms, drawings, maps, along with the content from Twitch and Wistia for free.
Install the Plugin
To start using the plugin, we must first add it to our website. From your admin dashboard, go to Plugins > Add New and look for EmbedPress. Then, install and activate the plugin.
The EmbedPress section will now appear in your menu but there aren’t any particular settings for you to modify at this point. You’ll have the option to edit the URL of your Google sheet, but only after you embed it (more on that in a sec).
Copy the Google Sheet URL
Now that the plugin is active, let’s head back to your Google Drive. Again, you have to make sure the document is published, but, this time round, we don’t need the iframe code.
Once you click on Publish to Web, instead of the Embed tab, you will need the Link.
If your document has already been published, like in our case, the link will be right there. Otherwise, simply click on the Publish button.
The same options are available as when our goal was to obtain the iframe code, except that now we can also select the publishing format (web page, CSV, PDF, etc.).
Embed Google Sheets
The next thing you should do is copy the link and go to your WordPress dashboard. Select Pages > Add New and paste the link in the visual editor.
In Gutenberg, you should click on the “+” symbol, and find the EmbedPress block. Form its dropdown menu select Google Sheets.
The Google Sheets block will now be added to your page, and all you’ll have to do at this point is paste the Google Sheets URL in the designated field. After that, press the Embed button.
And that’s it. Your Google Sheet is now added to your website. Just don’t forget to save the changes, and press the Publish button. If you’d like to edit your URL at any point, simply select the pencil symbol.
The procedure is the same for Elementor users. Upon installing and activating the plugin, you will now have an EmbedPress widget available, which you can add anywhere on your page and edit its content by pasting the link you’ve obtained from Google Sheets.
Conclusion
Google Sheets are handy, neat, powerful, and it’s a good thing to know how to add them to your website. Both methods we discussed are quite simple and require minimal effort from the user’s end. The no-plugin way may suffice, but we also wanted to introduce you to an alternative. It can’t hurt to know how to embed Google Sheets in WordPress using a plugin that also gives you the chance to embed some additional file types. But it’s up to you to opt for the method you feel more comfortable with.