NorthStar Analytics
Pricing

HiDocs High-Quality Ghost Documentation Theme

How to Use IMPORTHTML Function in Google Sheets?

How to Use IMPORTHTML Function in Google Sheets?

When working with Google Sheets, we may want to import tables or lists from the pages we browse the internet on our own. No need to bother with copy-paste. Because format it again is a waste of time.

We can easily do this with IMPORTHTML. It is a very useful function, especially for use in data visualizations.

Let's have a study where we look at the relationship with the life expectancy of country X and GDP per capita or let's study the ratio of male and female populations in countries to the general population.

The syntax of the function is pretty easy. It is enough to know the URL of the page we are working with and what we want to receive. Let's explain the syntax and how the function works through an example.

What is the syntax for the IMPORTHTML function?

Let's explain the syntax through the screenshot above. We will bring the tables or lists on the Wikipedia page, which are offered as suggestions on our Google sheets worksheet, to our page.

=IMPORTHTML(“URL”,”query”, index,locale)

=IMPORTHTML("https://en.wikipedia.org/wiki/Demographics_of_India","table",1)

  • URL:https://en.wikipedia.org/wiki/Demographics_of_India
  • Query(Table or list): There are many tables and lists on the Wikipedia page. We will choose a table or list according to our request. I wanted a table in the example.
  • Index: There may be more than one table on the page where we want to retrieve the data. In such a case, we must enter the order of the table we want. In the example, I entered it as '1' because I wanted the first table on the page.
  • Locale: The language to be used when retrieving the data. If not specified, the local language is selected.

That's it for the function. Now let's take a look at the new version of our worksheet.

After the data come to our page, we cannot make any changes to it. If we want to make such a change,

Right click->Copy->Paste special-Values ​​only

Make your business data transparent!
  • Subscribe to a package

    Subscribe and explore the limits of your business with data or thinking to expand your agency value proposition with Google Data Studio dashboards?

  • Request unlimited dashboards

    You can request as many dashbaords you might have and as many revisions as you might need. We create a queue of your tasks, the first tasks that come in are the tasks that we’ll deliver first.

  • Your Data Studio Department

    Optimise your business with complete transparency through dashboards or provide value-added Google Data Studio service to your agency clients.

Make your business transparent

The fastest easy-to-use Google Data Studio dashboards without any recurring cost.