IMPORTHTML is a Google-Sheets-specific function that does not exist in Excel — which is exactly why people end up here looking for a real walkthrough. This tutorial covers the syntax, the authorization step that catches everyone the first time, and three worked examples of how the function fits into a real reporting workflow.
What IMPORTHTML does
IMPORTHTML pulls a single table or list from a public web page. The arguments are the URL, the type ("table" or "list"), and the index (1-based) of which table or list on the page to grab. The result is the raw scraped data; structure and column headers depend on the page's HTML.
Authorization (the part the docs gloss over)
The first time you reference an external sheet or external resource, Google Sheets prompts you to grant the file permission. That prompt only appears once per source per file, and only the file owner sees it — collaborators get an immediate #REF! until the owner grants. Always add and approve the link from the file owner's account before sharing the dashboard. If a collaborator ever needs to take ownership, the link survives the transfer; if the source sheet is later deleted or its permissions change, the link breaks silently and you discover it the next time someone refreshes.
Worked example: cross-sheet reporting
Set up a Reporting file that pulls data from three regional sales sheets via IMPORTHTML. On the Reporting file's data tab, write one IMPORTHTML call per source range and verify each one returns data. Then build the actual report on a separate tab using QUERY or pivot tables against the imported ranges. Keep raw imports separate from rendered reports — when one source breaks, you want to see exactly which import failed without losing the rest of the dashboard.
Refresh and caching
IMPORTHTML results are cached. The cache refreshes when the source changes, when the file is opened, or roughly every hour for long-idle dashboards. To force a refresh during development, change the formula slightly (add a space, then remove it) — that invalidates the cache. There is no manual "refresh now" button for this family of functions.
Worked examples
Basic call
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_countries_by_population", "table", 1)
First-time use prompts for permission; click Allow access.
Wrapped in QUERY for filtering
=QUERY(IMPORTHTML("https://...", "table", 1), "SELECT Col1, Col2 WHERE Col2 IS NOT NULL", 1)
Note Col1, Col2 references because IMPORTRANGE strips the original column letters.
Wrapped in IFERROR for resilient dashboards
=IFERROR(IMPORTHTML(URL, "table", 1), "Scrape failed")
Stops a single broken source from cratering the whole dashboard.
Common mistakes (and how to avoid them)
- Forgetting that the file owner must approve the link before any collaborator can use it.
- Pointing at a sheet whose permissions change later — link breaks silently.
- Stacking many IMPORTHTML calls in a single dashboard. Each one is a network call; consolidate ranges where you can.
- Treating IMPORTHTML output like a normal range when columns reference original letters; in QUERY use Col1, Col2 references instead.
Tips that pay off later
- Pull the bare minimum range. Importing entire columns when you only need three is the single biggest performance hit.
- Always wrap external imports in IFERROR with a clear message — silent breakage is the worst kind of breakage.
- Document each external source with a small note cell ("From Q1 Sales File, owner: alice@") so the next person inherits the context.
When to reach for something else
If you control both files and you find yourself making heavy use of IMPORTHTML, consider consolidating them into one file with multiple tabs — a single sheet is always faster than two sheets stitched together.