Search code examples
xmlxpathgoogle-sheets

IMPORT XML function - Stock Price - Google Sheets


I'm trying to import the value of an ETF stock using IMPORTXML via Google Sheets. From the URL : https://www.justetf.com/en/etf-profile.html?isin=DE000A1DCTL3. What I have so far:

=IMPORTXML("https://www.justetf.com/en/etf-profile.html?isin=DE000A1DCTL3","//div[@class='col-xs-6']/div[@class='val']")

This outputs:

EUR 141.56 EUR 2,932 m
0.15% p.a.

google sheets image view

I would only like the Value of 141.56 to be output to the cell but I am unsure how to do this. Any help would be very much appreciated.


Solution

  • Try

    =IMPORTXML("https://www.justetf.com/en/etf-profile.html?isin=DE000A1DCTL3","//div[@class='col-xs-6']/div[@class='val']/span[2]")