'Published Google Sheet not showing in embedded iframe

I have published a Google Sheet and have modified the iframe embedded on my website to show a certain range of cells only. I am pretty sure the modification has been done correctly, yet when the iframe is embedded, I am getting the error seen in the screenshot Google Sheet. The iframe used is the following:

<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxx-1vTvQphG_8AomL4TacudrbUYMRlWuL_nITRnPMBeVEOz8bJ6y-3DXFdCqmZ7io9wgyvi6eEBl7Dju2qT/pubhtml?gid=1922308330$amp;widget=true&amp;headers=true&amp;chrome=false&amp;range=A1:B1" style="border:1px solid gray;" width="500" height="600"></iframe>

What am I doing wrong?



Solution 1:[1]

There is $ between gid and amp in the link, it should be &

Change your code from:

<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxx-1vTvQphG_8AomL4TacudrbUYMRlWuL_nITRnPMBeVEOz8bJ6y-3DXFdCqmZ7io9wgyvi6eEBl7Dju2qT/pubhtml?gid=1922308330$amp;widget=true&amp;headers=true&amp;chrome=false&amp;range=A1:B1" style="border:1px solid gray;" width="500" height="600"></iframe>

To:

<iframe src="https://docs.google.com/spreadsheets/d/e/xxxxx-1vTvQphG_8AomL4TacudrbUYMRlWuL_nITRnPMBeVEOz8bJ6y-3DXFdCqmZ7io9wgyvi6eEBl7Dju2qT/pubhtml?gid=1922308330&amp;widget=true&amp;headers=true&amp;chrome=false&amp;range=A1:B1" style="border:1px solid gray;" width="500" height="600"></iframe>

Reference:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1