IMPORTXML function: Automatically retrieves data from a Google Sheets table.

IMPORTXML is a useful data processing function in Google Sheets. Below is how to use IMPORTXML to automate the data import process in Google Sheets.

IMPORTXML is a useful data processing function in Google Sheets. Below is how to use IMPORTXML to automate the data import process in Google Sheets .

 

What is IMPORTXML in Google Sheets?

The formula for the IMPORTXML function in Google Sheets is as follows:

=IMPORTXML(url, xpath_query)

The IMPORTXML function imports data from any of the various structured data types, including XML, HTML, CSV, TSV, RSS, and ATOM XML.

It retrieves information from all XML fields. You can use it to import publicly available information on the Internet. Therefore, you are not allowed to use it with websites that require login to access.

When should you use IMPORTXML in Google Sheets?

  • Extracting data from the web
  • When you need data on the page but cannot activate Screaming Frog.

 

How to use IMPORTXML in Google Sheets

Before delving into the practical use of IMPORTXML, you need to understand the arguments in the formula:

Images 1 of IMPORTXML function: Automatically retrieves data from a Google Sheets table.

URL

  • This is the URL of the website where you want to import the data.
  • Includes the protocol (https:// or http://).
  • The URL value must be included in quotation marks or referenced to a cell containing appropriate text.

XPath Query

  • XPath queries run on the data of the provided URL.
  • Each result from an XPath query is placed in its own row in the spreadsheet.
  • XPath is a query language used to retrieve information from the web.
  • It has its own syntax, which you can learn more about in online sources.

Things you need to know about XPath:

  • Data on the web is displayed and stored in XML format.
  • Data query language.
  • You can customize Xpath arguments to suit your web search needs.

 

The IMPORTXML function allows you to import data directly from the web into your spreadsheet. Simply look at the web source code at the location where you want to import the data, find the usable HTML element, and extract it using XPath queries.

To find HTML elements, you have to look at the website's code. For example, on a wiki page, right-click on the page and select "View page source" from the menu that appears. When the source page is open, you will see its HTML code. For example, on Wikipedia:

Images 2 of IMPORTXML function: Automatically retrieves data from a Google Sheets table.

You may already be familiar with HTML tabs like

,

, … You need to use these tags in xpath_query to import the desired data from the web.

Here's an example of how to use IMPORTXML in Google Sheets:

Images 3 of IMPORTXML function: Automatically retrieves data from a Google Sheets table.

 

Images 4 of IMPORTXML function: Automatically retrieves data from a Google Sheets table.

Images 5 of IMPORTXML function: Automatically retrieves data from a Google Sheets table.

Above are the things you need to know about using IMPORTXML in Google Sheets . Hopefully, this article is helpful to you.

Close
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup