简体   繁体   中英

ImportXML with Index() function return wrong value

I have a problem with a function on Google Sheet. I wrote this in a cell :

=index(IMPORTXML(" https://coinmarketcap.com/currencies/power-ledger/ ";"//span[@data-currency-price]");1)

It should print the same value which is on this website : click here but instead of that it shows a complete different value. I don't get it, where am I wrong?

In my environment, your function retrieves 1.04 now. This is not the same with your result. So can you try this?

=IMPORTXML("https://coinmarketcap.com/currencies/power-ledger/","//span[@id='quote_price']/@data-usd")

This function retrieves ##### from following HTML.

<span id="quote_price" data-currency-price data-usd="#####">

If this didn't work, I'm sorry.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM