Spreadsheets are great, even though most of us don’t really like them. Google Sheets is probably one of the most popular spreadsheet programs, especially useful for collaboration and working in teams. Plus, it can be accessed from anywhere; you just need an internet connection.
Connecting Google Sheets to your WordPress site is not the hardest thing to do. Still, we will show you how to do it, step by step, and will even mention some plugins that can help you.
There are two ways you can go about it, and we will cover both. So let’s get started.
Use the Embed Code to Add Google Sheets
This method does not require you to use any plugin. You just need to generate your embed code using the Google Sheets interface and add it to your WP editor.
To do this, first, open the interface and the spreadsheet you want to embed. Make sure the spreadsheet is available for people to see. In other words, make it public or accessible to anyone with the appropriate link.
Next, click on the File option and then on Publish to the web.
Below, you can see how your interface will look like and where you will complete the above-mentioned steps.
Once you have clicked on Publish to the web, a popup will appear. There, you should click on Embed and choose if you want to embed the whole document or just an individual sheet.
In the Published content & settings section, you can choose if you want to republish your spreadsheet every time you make changes to it. This means that your embedded spreadsheet will always be updated. If you do not choose this option, you will have to manually edit and republish your spreadsheet when you want to update your data.
Once you have decided, click on Publish, and then you will see your embed code. Copy this code as you will need it later.
The next step is to go into your WP dashboard and create a post or page on which you want to embed your spreadsheet. You can also embed it into an existing content piece that you already have on your website.
If you are using the Gutenberg editor, you can add a custom HTML block and paste the embed code into it.
When you use the Preview setting, you should be able to see it in the editor.
Those using the Classic TinyMCE editor should paste the code in the Text tab of the editor, not the Visual tab.
After completing all of this, you have successfully added a Google Sheets document to your site. Now you just need to publish it, and it is ready for people to see.
Modifying Your Spreadsheet
Once published, your spreadsheet might look a bit disorganized. This can be corrected by changing the size of it.
To do this, you just need to specify the spreadsheet’s width and height within its HTML code. For example, if you want your spreadsheet to be 200px wide and 350px tall, the code should look like this :
Best Plugins for Embedding Google Sheets in WordPress
If you do not want to use the previous method, you can embed Google Sheets using a plugin. There are hundreds of plugins available, and here some we recommend:
Inline Google Spreadsheet Viewer
Inline Google Spreadsheet Viewer is a free plugin that lets you embed live previews of PDF, XLS, DOC, and other file formats.
With it, you can also turn data from CSV files, a MySQL database, or a Google Apps Script output into a beautiful interactive chart or graph. You can even add your own CSS.
When using this plugin, you can paste the URL of your public spreadsheet into a WP post or page. The data will appear in a sorted, searchable HTML table. Just remember to make sure you share your spreadsheet using either the “Public on the web” or “Anyone with the link” options.
wpDataTables is a plugin that lets you import data from Google Sheets into a self-hosted table. You can also automatically sync this data with Google Sheets, so it is always up-to-date, and you don’t need to update it manually.
This plugin can create responsive WP tables; you just need to provide the data (upload a file or type in a URL), configure and edit it, and publish the table on a post or page. It is really simple.
These tables can be viewed on any device and work well with many rows of data.
EmbedPress is a great plugin for embedding Google Docs, YouTube, Google Maps, Vimeo, Wistia, and Instagram data into your site. With it, you can embed any audio or video files from more than 75 sources. It is often updated and tested so you can be sure it works and is well maintained.
There is a free and premium version. The free version will be enough if you just need to embed Google Sheets in WP. But you can also embed Google Docs, slides, forms, drawings, and maps for free.
How to Embed Google Sheets Using a Plugin
Once you have decided which plugin you wish to use (we will use the EmbedPress plugin for demonstration purposes), you need to install and activate it.
When your plugin is active, go back into Google Sheets, click on File, and then on Publish to the Web. This time you will click on the Link tab.
Now you can set the publishing format to be either a web page, CSV, or PDF file. Once you set this, click Publish, and you will get the shareable link.
Copy this link and go into your WP dashboard. Click on Pages, then on Add New, and paste the link in the visual editor.
If you use Gutenberg, click the “+” symbol and find the EmbedPress block. Then, from the dropdown menu, select Google Sheets. The Google Sheets block is now added to your page.
Next, you have to paste the URL in the designated input field and click the Embed button. Lastly, save the changes and click Publish.
That is all! The process for all the mentioned plugins is similar, and as you can see, not really difficult or complex.
Spreadsheets are really convenient, so it would be beneficial for you to learn how to use and embed them into your website. You can then easily pull data from Google Sheets to your WP site and have the data be updated automatically, so you provide the most recent information to your visitors.
As you can see, it is quite easy to add Google Sheets to WP. You can either use a plugin or do it manually. It’s really up to you!
Thanks for the detailed illustrated article. I’m going with a plugin as it seems the easiest. Thanks again for sharing.
If the Sheets permission is set to anyone with the link can edit, do other users need a Google account to edit the sheet from the WP link?