If you find this post helpful, consider a donation to help me continue creating how-to guides for everyone. The donation button is below. Thank you!
1. Publish your sheet to the web by going to File – Publish to the web. Here’s what it looks like in Google Sheets:
2. Click on Embed and grab the embed HTML code (which uses an iframe). I publish the “Entire Document,” but you can be more specific if you like by clicking on the down arrow next to “Entire Document.” I also let it update automatically.
3. Modify the iframe code so it reads like so. You’ll need to change different pieces of the code to match your own spreadsheet:
Note about “gid”: You see that “gid=0”? You get that from the URL of the spreadsheet tab you are actively looking at. Here are two image of the URL of my sheet with the “gid” part highlighted:
Note about range: You manually specify the range in the “range=” part of the URL. This is the “&range=A1:C26” that you see in the URL of the embed code.
Here’s a live example of the working embed code:
Below is an embed of the second sheet within the same test project. To embed this specific sheet, I had to click on its tab within the project to make it active, then inspect the URL that gets loaded. That URL contains the gid number. It’s not something simple or logical like “2” or “1.” In my case, it was 2106886376, as the image above shows. So all you do is change the functioning embed code to reflect that.
So here’s what the embed code for the 2nd sheet in my project looks like. Notice how the “gid” part of the URL has changed:
And below is the result:
That’s it! Add your questions in the comments or email them to me at email@example.com. Good luck!
Update Sept. 5, 2021: It seems Google has updated their embedding capabilities, making it easier to some degree. This support page lists some useful parameters to toggle using “true” and “false” in the URL of the embed code. The “chrome” toggle is likely very useful to most people. I’ve updated my guide below to reflect those changes.
Update March 30, 2020: The coronavirus disease 2019 (Covid-19) I suspect has greatly increased interest in using remote collaborative tools such as Google Sheets, Docs, and other Suite tools offered by the company (not to mention Slack, Zenkit, FaceTime, and on and on). Given that, I have tried to increase the visibility of this post. Thank you and best of luck making it through this global crisis.
Update April 14, 2014: With the help of a Good Samaritan reaching out to me via email, a solution has been found for embedding specific ranges of the new Google Spreadsheets (they were updated in early 2014) onto your site.