How to Show website data into google sheets

Website Data Introduction -: Every website has data. These data are in table format. For example if website is related to health then its represent the health data. if the website giving the information about trading its showing trading data. These data are called website data. These may be different to each other. In this post we will learn how to show website data into google sheets using the script editor.

There are many way to save these data into local system but here we will see two type.

  • 1-: Show website data into google sheets using google script
  • 2-: Show website data using simple command in google sheets

How to Show Website Data Into Google Sheets

There are two method for showing website data into google sheets

1-: For script editor tools-: Google spreed sheet provide this tools. we can open this tool easily. First open the spreed sheet and select the tool option in the Menu bar where we select the script editor <>.

Now a window will open here as like

website data show using script editor

Now write this code here as like

function getdata() {
  var sheetName = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
  var querystring = Math.random();
  var cellfunction = '=IMPORTHTML("https://www.worldometers.info/coronavirus/","table",1)'
  sheetName.getRange('A1').setValue(cellfunction);
  
}

After writing this code save the file. You can save here and give the File name.

After saving the file run the program. Its asking the authentication permission. Give the Review permission here.

display data using script editor

Its asked the gmail and click the advance button and give the permission and allow it. After allowing the all website data table inserted into the google spreed sheet.

Another way for downloading website data into google sheet

This is the simple way for display website data into google sheet. For follow these process.

1-: First open the website which data you want to in your google sheets. for example i am taking a corona virus data from this website “https://www.worldometers.info/coronavirus/”. Here table list has been showing here as like

website data show in google spreed sheet

2-: Here select the table which you want to download or want to save into google sheets.

3-: Now open the google sheets and select a blank sheet here. If you don’t know then follow these process

  1. Open the Gmail id here.
  2. Now select google apps here select sheets and click it
show website data into google sheet

4-: In the google sheet where we want to save data which cell we double click from the help of mouse. Suppose we are starting into A column with 1 row then double click here.

5-: Now we type in this cell =IMPORTHTML(“website link write here”, “table”,1) and press enter here as like

=IMPORTHTML(“https://www.worldometers.info/coronavirus/”,”table”,1)

formula of showing data to google sheet

6-: After giving this code press enter and wait some time your data has been comes into google sheets. You can save this data into google sheets. This was looking like

website data show into google sheets

7-: If we want to save selected data then we can save these data into another google sheets. Suppose we want to country name and new cases data then we open another google sheets and give this formula in the cell where we want to upload data as like

=Sheet1!A1 and press enter. It take some time . If we want to add another column then type the name here as like =Sheet1!b1 and after the help of mouse we can increase this all the data will be show here.

Leave a Comment