-1

Trying to grab from a link (https://www.valueresearchonline.com/stocks/1764/infosys-ltd?utm_source=direct-click&utm_medium=stocks&utm_term=&utm_content=Infosys&utm_campaign=vro-search#snapshot)- this is the relevant HTML:

I've made the following query to try and work with the subsequent HTML:

Essential Checks
Altman Z-Score   
=IMPORTXML($A$2,"//*[@id='z-score']/div/div[2]/div/div")

A2 having the relevant URL.

I think the Xpath is correct there, but not sure why it won't give me the result.

theduck
  • 2,589
  • 13
  • 17
  • 23

1 Answers1

0

According to the IMPORTXML documentation:

IMPORTXML imports data from any of various structured data types including XML, HTML, CSV, TSV, and RSS and ATOM XML feeds.

Therefore, the =IMPORTXML() command you are using reads the HTML source of the page without any JavaScript code associated with it and without executing it.

So since the website you are trying to import the data from is a dynamic website, the results you are getting are not the expected ones. In this case, unfortunately, the use of IMPORTXML() is not possible.

ale13
  • 5,679
  • 3
  • 10
  • 25