Embed a Google Sheet in a shared HTML page
A dashboard or report page that shows a Google Sheet, or reads its rows to draw a chart. Which Sheet addresses display inside a page, which ask viewers to sign in, how to load the rows with fetch() without an API key, and how to share the page as a link.
Ask Claude or ChatGPT for a dashboard, a price list or a team tracker "from my Google Sheet" and it either puts the sheet in an <iframe> or writes a fetch() call that reads the rows. Both work in a shared page if the sheet address is right and the sheet is shared.
The tests below were run in headless Chrome, on a page served over http, against a sheet set to "Anyone with the link: Viewer".
Share the sheet first
In Google Sheets choose Share, then under General access pick "Anyone with the link" and Viewer. Without this, a viewer who is not signed in to an account with access sees a Google sign-in box where the sheet should be. Tested: a sheet address the viewer had no access to showed "Sign in to your Google Account" inside the frame.
Anyone who opens your page can read the sheet address in the page source and open the full sheet, every tab included. Put only what you want shown in that spreadsheet, or copy the shared rows to a separate one.
Which address to put in the iframe
Replace /edit... at the end of the sheet address with one of these. Tested, all on the same sheet:
- ✓/preview: loaded. Rows and tab names only, no toolbar. The cleanest choice for a page.
- ✓/htmlview: loaded. Same as /preview with the spreadsheet title above the grid.
- ✓/edit?rm=minimal: loaded, with column letters and row numbers, no toolbar.
- ✓/edit: loaded the full editor, with a Sign in button and a "window is too small" notice in a 400 pixel frame.
- ✓/pubhtml?widget=true: showed the sign-in box, because this address only works after File, Share, Publish to web.
Read the rows with fetch() instead
To draw your own chart or table from the sheet, read it as CSV. No API key is needed for a link-shared sheet. Tested with fetch() from the page:
- ✓/gviz/tq?tqx=out:csv: returned the rows, status 200. Add &sheet=Tab%20Name to read a tab other than the first.
- ✓/export?format=csv: returned the rows, status 200, after a redirect to googleusercontent.com.
- ✓/pub?output=csv: failed with "Failed to fetch" on a sheet that was not published to the web.
Edits show without re-uploading
Both the iframe and the fetch() call request the sheet each time the page loads. The page keeps no copy, so a price or a status you change in the sheet appears on the next load, and the link stays the same.
For data that should stay fixed, such as a report for a given month, copy the rows into the page instead: loading a JSON or CSV file in a shared page.
Upload it and send the link
Drag the HTML file onto the FileShare Pro dashboard and copy the link. Viewers need no account. The shared view does not restrict frames inside your page, so the sheet loads there as it did in the test.
Turn on comments and viewers can pin a question to a row or a chart after typing a name: letting people comment on a web page. Related: a dashboard that reads a CSV file and an embedded Google Map.
Frequently asked
No. The password protects the page. The sheet is open to anyone with its address, and the address is in the page source: password-protecting an HTML page.
No. Shared files carry a noindex header: keeping a preview out of Google.
Drop the file, copy the link — live in seconds, free plan included.
Start sharing free