Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
Mountain View desk7 min

How to Publish Google Sheets Data on a Website

A complete guide to publishing Google Sheets data on a website: native embeds, tab and range parameters, update delays, privacy checks, APIs, Apps Script and screenshot automation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The quickest way to show Google Sheets data on a website is File → Share → Publish to web. Choose the whole spreadsheet or one sheet, select a format, click Publish, then copy either the public link or Google’s generated embed HTML. The published view is read-only and normally reflects later edits automatically, although Google says updates can take a few minutes.

Publish a sheet in five steps

  1. Open the spreadsheet. Remove columns, rows and tabs that visitors must not see before publishing.
  2. Open File → Share → Publish to web. This is different from the ordinary Share dialog: publishing creates a web-facing version.
  3. Choose the scope. Select Entire spreadsheet or an individual sheet tab. Publishing one tab is safer when the workbook contains unrelated data.
  4. Choose a format. Use the web-page view for a browser-readable page, or select an available file format when you need a downloadable representation.
  5. Click Publish and confirm. Copy the generated URL for a normal link, or choose Embed, copy the iframe HTML, and paste it into your site’s HTML block.

Anyone who can access the published audience can read the values, charts and cell formatting. They cannot use the published view to edit the source or inspect its formulas. Depending on your account and organisation policy, the audience can be everyone on the web, everyone in your organisation, or a selected group.

Embed the published spreadsheet

Google’s Embed option supplies an iframe. A typical result resembles this (use the exact URL and dimensions Google generates for your file):

<iframe src="https://docs.google.com/spreadsheets/d/FILE_ID/pubhtml" width="100%" height="600" frameborder="0"></iframe>

Paste it into an HTML/custom-code block in your CMS. Set a useful height instead of relying on a tiny default frame, and test the result on a phone. Your site’s content-security policy, iframe policy or builder may block third-party frames; if so, use a plain link or a custom API integration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Mastering Google Sheets: A Step-by-Step Handbook for Beginners to Simplify Data Analysis, Boost Productivity, and Unlock Your Full Spreadsheet Potential
  • Mastering Google Sheets: A Step by Step Handbook for Beginners to Simplify Data Analysis, Boost Productivity, and Unlock Your Full Spreadsheet Potential
  • ABIS BOOK

Show one tab

Add the sheet’s tab identifier to the published URL:

https://docs.google.com/spreadsheets/d/FILE_ID/pubhtml?gid=123456789

gid selects the worksheet tab. It changes which tab is displayed; it does not make other published data private if your publication scope still includes it.

Limit the visible range

Use the range parameter for a rectangular range such as A1:B14:

https://docs.google.com/spreadsheets/d/FILE_ID/pubhtml?gid=123456789&range=A1:B14

This is a presentation filter, not an access-control boundary. Treat any values included in the published scope as public to that audience.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Control the embedded chrome

These documented parameters adjust the reader interface:

Parameter Values Effect
gid Sheet ID Selects a tab.
range For example A1:B14 Limits displayed rows and columns.
widget true or false Shows or hides the sheet-tab bar.
headers true or false Shows or hides row and column headers.
chrome true or false Shows or hides title and footer controls.

URL-encode ampersands when placing a URL inside HTML attributes if your editor requires it (for example, write &amp; in source HTML).

Keep the website current

Edit the original spreadsheet, not the published page. Google states that source edits flow to the published version automatically, but propagation may take a few minutes. If visitors still see an old value:

  • Wait several minutes, then reload the published URL directly.
  • Check that you edited the same file and tab that the iframe’s gid identifies.
  • Clear a browser or proxy cache, or add a cache-busting query string only if your site’s caching layer permits it.
  • Confirm the publication is still active under File → Share → Publish to web → Published content & settings.

To withdraw access, return to Published content & settings and choose Stop publishing. Remove the iframe or link from your site as well; stopping publication does not remove copies someone may already have downloaded.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the right implementation

Approach Setup effort Presentation control Access model Update control Exposure
Publish to web + iframe Lowest Limited to Google’s view and URL parameters Public or account-policy audience Google refreshes, with possible delay Published values are exposed
Visualization API Development required Custom charts and interactions Public or link-shared source; private data needs user credentials and authorization Your application controls requests and refresh Only data your code requests, but credentials must be protected
Sheets API v4 Development and Google Cloud configuration Full custom UI, including writes Authenticated reads and writes Your code controls refresh and caching Can keep the spreadsheet private when authorization is implemented correctly
Apps Script web app Script and deployment required HTML, CSS and JavaScript under your control Deployment access setting determines who can use it Script controls retrieval and transformation Expose only the fields your script returns

Use Publish to web when

  • You need a read-only table or chart quickly.
  • The information is safe for the chosen public or organisational audience.
  • A few minutes of update delay is acceptable.
  • You do not need custom filtering, authentication or write-back.

Use an API or Apps Script when

  • The source must remain private.
  • You need a branded, responsive interface rather than an iframe.
  • Your page needs sorting, search, calculated fields or user-specific data.
  • Visitors must submit changes or your application must write to the sheet.

Google Sites option

In Google Sites, open Insert and choose a Sheets file or chart. Sites also provides Embed for HTML, CSS or JavaScript. Publish the Google Site itself before testing as a visitor. Google recommends publishing the source file first when every visitor needs access; otherwise the embedded object can remain unavailable to them.

Security and privacy checklist

  • Classify the data first. Do not publish passwords, personal identifiers, internal notes, hidden business fields or anything covered by a confidentiality obligation.
  • Create a clean publication copy. Move public columns to a separate spreadsheet instead of relying on hidden tabs or formatting.
  • Verify the audience. Check whether the account or organisation setting makes the page available to everyone, only your organisation, or a selected group.
  • Assume published values can be copied. Viewers can save, quote or rehost what the page displays.
  • Review formulas and linked data. The published view hides formulas, but the resulting values can still disclose information.
  • Revoke deliberately. Use Stop publishing when the page should no longer be available, then remove embeds and links.

Or skip the browser setup

If you need a stable image or PDF of the published page for a report, documentation page or social preview, ScreenshotNeo can capture the URL with one request. It accepts the page as a visitor: cookie banners are accepted and more than 60 known consent platforms, newsletter popups and chat widgets are removed before capture. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and whether it was billed. Its MCP server lets Claude, Cursor and other MCP clients call take_screenshot, get_page_info and capture_pdf.

For the full parameter list, see the ScreenshotNeo documentation. This cURL request captures a published Google Sheet as WebP:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://docs.google.com/spreadsheets/d/FILE_ID/pubhtml -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://docs.google.com/spreadsheets/d/FILE_ID/pubhtml"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://docs.google.com/spreadsheets/d/FILE_ID/pubhtml' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo includes full-page capture, device and retina settings, custom CSS or JavaScript, waits for a selector or network idle, PDF paper and margin controls, hiding selectors, caching with your chosen TTL, signed links, asynchronous webhooks and bulk capture of up to 100 URLs per call. Every feature is on every plan: 1,000 shots per month are free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to get started.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting

The iframe is blank

Open the published URL in a private browser window. If it asks for permission, the publication audience is restricted or the source was not published. Republish with the intended audience, or use an authenticated API instead of a public iframe.

Rank #3
Sale
The Google Workspace Bible: [14 in 1] The Ultimate All-in-One Guide from Beginner to Advanced | Including Gmail, Drive, Docs, Sheets, and Every Other App from the Suite
  • The Google Workspace Bible: [14 in 1] The Ultimate All in One Guide from Beginner to Advanced Including Gmail, Drive, Docs, Sheets, and Every Other App from the Suite
  • ABIS BOOK

The wrong tab appears

Inspect the URL’s gid. Replace it with the identifier from the intended tab, and ensure the tab was included in the publication scope.

Only part of the table is visible

Remove an overly narrow range, correct the A1 notation, or publish the entire sheet. A range controls what is rendered; it does not grant access to unpublished cells.

Changes have not appeared

Allow the documented propagation delay, reload the direct published URL, and check intermediary caching. Confirm the source edit was saved and that the iframe points to the current file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The site builder rejects the iframe

Use its dedicated embed component, switch to a plain link, or build a custom page with the Visualization API, Sheets API v4 or Apps Script. Site security policies can prohibit arbitrary iframe HTML.

The API returns unauthorized or quota errors

For private spreadsheets, implement the required Google authorization flow and request only necessary scopes. Verify the project, credentials and quota configuration; a public Publish-to-web URL cannot provide authenticated write access.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

FAQ

Can visitors edit an embedded published sheet?

No. The published representation is read-only; editing requires sharing the source or creating an authenticated application.

Can I publish just a chart?

Yes, Google Sites can insert a Sheets chart. For a custom website, request the needed data with the Visualization API or Sheets API and render the chart yourself.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does hiding a tab protect it?

No. Hiding interface elements changes presentation, not the audience’s security boundary. Publish only data that is safe to expose.

Frequently Asked Questions

Can visitors edit an embedded published sheet?

No. The published representation is read-only; editing requires sharing the source or creating an authenticated application.

Can I publish just a chart?

Yes, Google Sites can insert a Sheets chart. For a custom website, request the needed data with the Visualization API or Sheets API and render the chart yourself.

Does hiding a tab protect it?

No. Hiding interface elements changes presentation, not the audience’s security boundary. Publish only data that is safe to expose.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.