Web >> Google >> Sheets >> Formula >> IMPORTXML >> Syntax and examples of IMPORTXML formula

 

IMPORTXML

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

Sample Usage

IMPORTXML("https://en.wikipedia.org/wiki/Moon_landing", "//a/@href")

IMPORTXML(A2,B2)

Syntax

IMPORTXML(url, xpath_query)

  • url - The URL of the page to examine, 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.
  • xpath_query - The XPath query to run on the structured data.