IMPORTHTML

Imports data from a table or list within an HTML page. Learn more

Video field
Web

The IMPORTHTML(url, query, index) function in Google Sheets is a built-in function that allows you to import data from a specified URL into your spreadsheet.

It is part of the Google Sheets' IMPORT family of functions.

Here is a breakdown of the function's parameters:

url: This parameter specifies the URL of the webpage from which you want to import data. It should be enclosed in quotation marks (" ").

query: The query parameter is used to specify the type of data you want to import and how it should be extracted from the webpage.

The format of the query depends on the value of the index parameter.

index: This parameter determines the table from the webpage that you want to import. It can be either 1, 2, 3, or -1.

If index is 1, the function imports a table from the webpage.

If index is 2, the function imports a list from the webpage.

If index is 3, the function imports a specific table based on a CSS selector from the webpage.

If index is -1, the function imports all tables or lists from the webpage.

The IMPORTHTML function returns an array containing the imported data.

You can use this function to fetch and analyze data from websites directly within your Google Sheets, eliminating the need for manual data entry.

Please note that the IMPORTHTML function has some limitations, such as the maximum number of cells it can import and the frequency at which it can update the imported data.

You can find more information about these limitations in the Google Sheets documentation.

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!