-4

i am trying to extract some data from below web page to google-sheets using importxml formula.

http://tsetmc.com/Loader.aspx?ParTree=151311&i=25244329144808274

the required field is shown in attached image. required record

please help me on correct syntax. Thanks.

mehdi ph
  • 1
  • 1
  • What you need is dynamically loaded using javascript, so `IMPORTXML` won't get it as it does not render js. You might want to look at how this is achieved in Python (just for example): https://stackoverflow.com/questions/8049520/web-scraping-javascript-page-with-python. And then try to do the same in Google Script for you Sheet. – kishkin Apr 25 '20 at 17:58

1 Answers1

0

Actually, we can fetch the data from elsewhere. Just use :

=IMPORTXML("http://en.tsetmc.com/loader.aspx?ParTree=121C1412&inscode=25244329144808274";"//tr[./th[.='Quantity']]/following-sibling::tr[1]/td[2]")

Output :

Stock

E.Wiest
  • 5,425
  • 2
  • 7
  • 12