1

In this link answer in line 6, how to identify how many getElement("div") and getElements("div")[number] should be captured from a URL.

This is the URL from where I am looking to capture the table.

Community
  • 1
  • 1
Vasim
  • 2,848
  • 3
  • 27
  • 54

2 Answers2

6

You may want to look into using import.io, which is a tool specifically for extracting tabular data from web pages, and which has an Apps Script integration.

Eric Koleda
  • 12,032
  • 1
  • 31
  • 50
0

another example could be to pull the table into Sheets and the access the data from within the Sheets. For example:

=importhtml("http://www.tradingeconomics.com/zambia/rating","table",1)

This pulls the first table on the particular webpage into the sheet.

Jan Krynauw
  • 952
  • 7
  • 19