1. Home
  2. Functions
  3. Web
  4. IMPORTHTML

IMPORTHTML function

Imports a table or list from a web page. Live web data is not available yet, so this returns #BLOCKED!.

Syntax

=IMPORTHTML(url, query, index, [locale])

Arguments

ArgumentRequiredDescription
urlRequiredThe page address
queryRequired"table" or "list"
indexRequiredWhich table or list, from 1
localeOptionalLocale for parsing

How to use IMPORTHTML

This function reads data from outside the workbook, so its result depends on what the source returns when the sheet calculates.

IMPORTHTML takes 3 required arguments and 1 optional argument. Type =IMPORTHTML( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=IMPORTHTML("https://example.com", "table", 1)Result #BLOCKED!

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.