Google Spreadsheet: Parameter parameter could not be parsed

I am using this script to integrate ImportJSON into my google sheet. I am running the command:

=IF(B4="";"";VALUE(ImportJSON("https://min-api.cryptocompare.com/data/price?fsym="&B4&"&tsyms=USD";"/USD";"noHeaders";$L$1))*$C$2)

      

Where B4 contains: "BTC" and this is the value I return.

Now I can see my value in the error window:

The values โ€‹โ€‹of the parameters 1423.42 cannot be parsed into a number.

The number contains a period ('.'). I don't know if this is the problem?

Does anyone know how to fix this in my case?

+3


source to share


3 answers


This formula gives me no error:



=IF(B4="","",VALUE(ImportJSON("https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD","/USD","noHeaders","/feed/entry/title,/feed/entry/content")))

      

0


source


This worked for me



=IF(B4="";"";VALUE(substitute(ImportJSON("https://min-api.cryptocompare.com/data/price?fsym="&B4&"&tsyms=EUR";"/EUR";"noHeaders";$L$1);".";","))*$C$2)

      

0


source


One more question to this topic:

If I ImportJSON

add a SUBSTITUTE

function for more than one entry, it only shows the first entry


Here is my code now:

=(VALUE(SUBSTITUTE(ImportJSON("https://api.coingecko.com/api/v3/coins/bitcoin?localization=false&tickers=true&market_data=true&community_data=true&developer_data=true&sparkline=true";"/market_data/price_change_percentage_7d_in_currency/usd,/market_data/price_change_percentage_7d_in_currency/eur";"noHeaders");".";",")))

      

I want to replace "." behind ";" so that I can show the parsed values โ€‹โ€‹as a percentage.


Is there any other way to format the imported data JSON

? - Without referencing them in another table and formatting them there.

Many thanks! Tommy

0


source







All Articles