Open a Google Spreadsheet or Create New
Go to the Google Spreadsheets select a blank file to create one or a template, or an already made file.
Publish Google Spreadsheet to Web
Here is a New File, Created now I will publish this file to Web
Go to File > Publish to the Web
Go to File > Publish to the Web
Embed Google Spreadsheet Get Code
As in the Screenshot Once you click Publish to the Web, you will see the above window go to Embed > Select Sheet ( to embed ) > Check Automatically Republish When Changes are made > Publish ( Green Button )
After you Publish you will see this Window Below in the Screenshot that will have the code that you can embed in your WordPress.
After you Publish you will see this Window Below in the Screenshot that will have the code that you can embed in your WordPress.
Embed Google SpreadSheet WordPress Post to as an iframe
Follow the Short Screencast Above, To embed the code of google spreadsheet on the WordPress Post or Page you have to
Add a new HTML Block > Paste code inside the block > Preview,
once your preview the same you will see the Sheet as shown in
Example 1 of Code Embeds Below of this tutorial.
Embed Google Spreadsheet WordPress With Specific Range
For displaying only specific cells with a defined width and height of the Spreadsheet, We will modify the HTML code of iframe,
Take an example to display the A2 to D3 cells range.
Example 2 of Code Embed Below Shows the same.
Take an example to display the A2 to D3 cells range.
Example 2 of Code Embed Below Shows the same.
Example 1 of Google Spreadsheet Code Embed
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRUn0XW7C63CyCPe5ZxkGSontQq-cJdDnFwBynZZTICAyRyKX7yxbgz3BwuxeYAwIay92NfYKyWMhul/pubhtml?gid=0&single=true&widget=true&headers=false"></iframe>
Example 2 Embed Google Spreadsheet WordPress With Specific Range
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRUn0XW7C63CyCPe5ZxkGSontQq-cJdDnFwBynZZTICAyRyKX7yxbgz3BwuxeYAwIay92NfYKyWMhul/pubhtml?gid=0&single=true&widget=true&headers=false&range=A2:D3" width="400" height="350"></iframe>
Html Blocks are really usable in WordPress I have also made some Reusable Html Blocks in WordPress in a separate post here that are AMP Compatible.