Search code examples
google-sheetsstock

Read stock price from Financial Times in google sheet


I can read the ETF price price from Financial Times in the google sheets but cannot read the stock price? Please help me to understand what wrong I am doing?

I am successfully able to get the ETF price from below link in google sheet-

=importxml("https://markets.ft.com/data/etfs/tearsheet/summary?s=SPXP.GB:NXX","/html/body/div[3]/div[2]/section[1]/div/div/div[1]/div[2]/ul/li[1]/span[2]")

I have tried the same thing for stocks but not getting the price in the below link.

=importxml("https://markets.ft.com/data/equities/tearsheet/summary?s=HINDUNILVR:NSI","/html/body/div[3]/div[2]/section[1]/div/div/div[1]/div[2]/ul/li[1]/span[2]")


Solution

  • You may try:

    =+importxml(A2,"//li[1]/span[2]")
    

    enter image description here