<< Go back to all functions

IMPORTHTML

The IMPORTHTML function in Google Sheets is a powerful tool to import data from a table or list within an HTML page. Whether you're gathering data for analysis, research, or creating dynamic reports, the IMPORTHTML function simplifies the task. Dive into our comprehensive guide to master its application.

Function Syntax and Parameters

Syntax: IMPORTHTML(url, query, index)

Parameters:

  • url: The URL of the webpage containing the table or list to import.
  • query: The type of data to import, either "table" or "list".
  • index: [Optional] The index of the table or list to import, starting from 0.

Step-by-Step Tutorial

  1. Importing a table from a webpage:

    • Example: =IMPORTHTML("https://www.example.com", "table", 0)
    • Result: Imports the first table found on the webpage.
  2. Importing a list from a webpage:

    • Example: =IMPORTHTML("https://www.example.com", "list", 1)
    • Result: Imports the second list found on the webpage.

Use Cases and Scenarios

  1. Data Analysis: Import financial data from websites for further analysis.
  2. Research: Gather data from online sources for academic research.
  3. Automated Reporting: Import live data into reports for real-time updates.

Related Functions

  • IMPORTXML: Imports data from various structured data types in XML format.
  • IMPORTDATA: Imports data from a CSV or TSV file.

Related Articles