-3

I want fetch the table details from https://www.edelweiss.in/market/nse-option-chain in a gogle sheet, I had used the formula =IMPORTHTML("https://www.edelweiss.in/market/nse-option-chain","table",1) , but getting the empty error.

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • Does this answer your question? [Scraping data to Google Sheets from a website that uses JavaScript](https://stackoverflow.com/questions/74237688/scraping-data-to-google-sheets-from-a-website-that-uses-javascript) – Rubén Jan 04 '23 at 00:11

1 Answers1

1

Unfortunately, the =IMPORTHTML cannot be used because the website you're trying to get the data from load the data dynamically.

Possible solution

A possible solution to gather the data might be found if you follow these steps:

1. Identify the the URL that is making the request with the data you want

You can do this by using the Google Chrome Console and checking the Network Tab and filtering the requests by XHR.

2. Import the IMPORTJSON library and use Apps Script

Install the library by accessing this link here. You should install the library by using Apps Script and going to Tools -> Script Editor -> add the ImportJSON.gs.

3. Use the formula in your Sheet

You could use the formula like this:

=ImportJSON("THE_LINK_FOUND_AT_STEP_1")

Reference

Community
  • 1
  • 1
ale13
  • 5,679
  • 3
  • 10
  • 25