0
0
Google Sheetsspreadsheet~8 mins

IMPORTHTML for web tables in Google Sheets - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - IMPORTHTML for web tables
Dashboard Goal

Show live data from a web page table about the top 5 countries by population. This helps track population numbers without manual updates.

Sample Data
CountryPopulation (millions)
China1441
India1393
United States332
Indonesia276
Pakistan225
Dashboard Components
  • Web Table Import: Cell A2 formula:
    =IMPORTHTML("https://www.worldometers.info/world-population/population-by-country/", "table", 1)
    This imports the full population table from the website.
  • Top 5 Countries Table: Extract first 5 rows from imported data:
    =QUERY(A2:C, "SELECT Col1, Col2 LIMIT 5", 1)
    Shows only top 5 countries and their populations.
  • Total Population of Top 5: Sum populations:
    =SUM(B3:B7)
    Calculates total population of these 5 countries.
Dashboard Layout
+-----------------------------+
|       Web Table Import       |
|       (Raw Data)             |
|       (A2:C100)              |
+-----------------------------+
| Top 5 Countries Table | Total Population |
|       (A12:B17)       |     (B18)        |
+-----------------------------+
Interactivity

When the web page updates, the Web Table Import refreshes automatically. This updates the Top 5 Countries Table and the Total Population sum instantly, keeping the dashboard live without manual changes.

Self Check

If the website adds a new country with a higher population than Pakistan, which dashboard components update and how?

  • The Web Table Import updates with the new data.
  • The Top 5 Countries Table updates to show the new top 5 countries.
  • The Total Population recalculates to include the new top 5 populations.
Key Result
Live dashboard showing top 5 countries by population imported directly from a web table with total population calculation.