Reputation: 13
I have a google sheet that I use to track crypto positions and I'm using ImportXML to grab the current price of the coin off of coinmarketcap.com. All of them work with the same set of parameters:
Formula: =IMPORTXML("https://coinmarketcap.com/currencies/the-sandbox/", "/html/body/div[1]/div[1]/div/div[2]/div/div[1]/div[2]/div/div[2]/div[1]/div/span", "en US")
This works for every coin I've tried EXCEPT SAND (https://coinmarketcap.com/currencies/the-sandbox/) and I've no clue why. I have tried pretty much every combination of the path I can think of.
Does anyone have any ideas? I am totally stuck on this one.
Upvotes: 1
Views: 8114
Reputation: 1
If you want have pure number without $ try this:
=VALUE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IMPORTXML("https://coinmarketcap.com/currencies/ethereum/"; "//div[@class='priceValue ']") ;"$";"");",";"");".";","))
Upvotes: 0
Reputation: 1
try:
=IMPORTXML("https://coinmarketcap.com/currencies/the-sandbox/";
"//div[@class='priceValue ']")
Upvotes: 2