HomeTutorialsHow To Import Web Data into Google Sheets using Formulas

How To Import Web Data into Google Sheets using Formulas

It’s very common that we all use Google sheets for making basic documents. But there is an abundance of features that we are unaware of. However, Google’s cloud-based Office can do many things that we never thought of. By saying so, I’d like to let you know about importing web data into Google sheets directly.

Additionally, Google sheets allow you to translate a text of a cell to multiple languages. Even web pages can be monitored using Google sheets. There are many, but I’ll talk here about importing web data in Google sheets only.

You don’t need to master any geek or write any scripts for making this amazing stuff happen in your Google sheets. Eventually, you just need to know some basic Google functions/formulas such as IMPORTDATA, IMPORTFEED, IMPORTHTML, IMPORTRANGE, IMPORTXML. And you’ll all set to start.

Import Web Data into Google Sheets using Functions/Formulas


From tons of Google sheets functions/formulas, it has 5 built-in functions/formulas to import different kinds of data into the sheets. And to import web data easily, you need to use IMPORTHTML one. So, let’s start and see how you need to use this function/formula to get your job done.

Import Web Data using ImportHTML


From the HTML page, to import table or list data, you need to use the =IMPORTHTML function. However, use this function =IMPORTHTML(X) and then replace the X with your selected web page URL. Lastly, complete the function by putting query and index.

IMPORTHTML Syntax

IMPORTHTML(url, query, index)

As you can see, the syntax of the function, so now it’s time to elaborate things up. Let’s see what this is all about (url, query, index).

url: The URL here means the page URL from where you would like to have your data into your Google sheets. Website protocol (e.g. https:// or https://) must be there in the URL. The entire URL must have encompassed in between a quotation mark. Instead of URL, it can be any particular cell with having the text that seems appropriate for you.

query: query means what type of web data you want to import into your google sheets. Either you can use “list” or “table”. It totally depends on the structure type of data you want to import.

index: This is the number identifying the table or list, starting with 1, that you are trying to retrieve from the HTML source. The number will change according to the position of your table and list on the web page.

web-data-into-google-sheets

IMPORTHTML Examples

IMPORTHTML("https://en.wikipedia.org/wiki/Demographics_of_India","table",4, "en_us")
IMPORTHTML(A2,B2,C2)

There’s something you need to know, once you complete the importing of table or list into Google sheets, the table will not update automatically even if the source page’s data changes.

To Google, the tables turn out as plain text. As a result, all kinds of formatting and links disappear once you import them into the sheets.

Final Words


Well, that’s how you complete the process and import web data into your Google sheets. It’s easier than you might think, right? Google sheets have an abundance of features, and you can go with whichever you like. But the mentioned-above function will be very easy for anyone.

However, Google sheets API and Google Apps Script coding can also help you out here if you wish to do so. If you find this article helpful, then feel free to share it with others and leave a comment in the below comment box.

Well, as it’s a wrap, it’s time to take leave. I’ll be back with another Google hack to make life easier and more effective. Till then, take good care of yourself, near and dear ones.

Mehedi Hasan
Mehedi Hasan
Mehedi Hasan is a passionate enthusiast for technology. He admires all things tech and loves to help others understand the fundamentals of Linux, servers, networking, and computer security in an understandable way without overwhelming beginners. His articles are carefully crafted with this goal in mind - making complex topics more accessible.

LEAVE A REPLY

Please enter your comment!
Please enter your name here


You May Like It!

Trending Now