As its counterpart ImportXML, the =IMPORTFROMWEB( ) function extracts your data using 2 arguments :
- the data source, i.e. an URL that describes the source of your data
- the selector, i.e. the path to the data you want to import (using built-in selectors, XPath or CSS selectors)
So, here is the simple syntax of the function:
Like any other spreadsheet functions, the arguments can be either written in quotation marks, or by referring to a range of cell(s) that contain them:
ImportFromWeb is luckily not limited to 1 single URL or 1 selector.
You can extract with the same function up to 50 URLs (as long as they share the same layout) and as many selectors as you want. Just refer to a list of URLs (up to 50) and use a comma between each selector, just like this:
=IMPORTFROMWEB(A1:A50, "selector 1,selector 2,selector 3"):
Go to the next sections to learn more about the data sources and the selectors types.
In Google Sheets, according to your locale settings, you may have to use commas or semicolons to separate parameters. Comma is usually the notation used in English speaking countries.
Those options are listed in the Options section and are easily integrated into your function as a 3d argument :
=IMPORTFROMWEB("data_sources", "selectors", "options")
For advanced users, ImportFromWeb lets you manipulate the data with regular expressions. It’s especially useful to clean up text, replace commas in numbers or remove unwanted characters
=IMPORTFROMWEB(data_sources, selectors, regexps, replaceBy, options)