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

Sample usage




IMPORTHTML(url, query, index)

  • url – The URL of the page to be examined, including protocol (e.g. http://).

    • The value for url must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.
  • query – Either "list" or "table", depending on what type of structure contains the desired data.

  • index – The index, starting at 1, which identifies which table or list as defined in the HTML source should be returned.

    • The indices for lists and tables are maintained separately, so there may be both a list and a table with index 1 if both types of elements exist on the HTML page.

See also

IMPORTXML: Imports data from any of various structured data types including XML, HTML, CSV, TSV and RSS and Atom XML feeds.

IMPORTRANGE: Imports a range of cells from a specified spreadsheet.

IMPORTFEED: Imports an RSS or Atom feed.

IMPORTDATA: Imports data from a given URL in .csv (comma-separated value) or .tsv (tab-separated value) format.

Learn how to optimise your data reference.


Visit the Learning Center

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

Clear search
Close search
Google apps
Main menu