I'm trying to import Crypto Data into Google Sheets. In the Apps Script there occours the following error:
Exception: Attribute provided with no value: url
ImportJSONAdvanced @ ImportJSON.gs:168
ImportJSON @ ImportJSON.gs:63
Also when I try to diplay data in the sheet withi this formula:
=importJSON("https://api.coingecko.com/api/v3/coins/markets?vs_currency=eur&ids=bitcoin")
i get the error "#NAME?"
Can anybody help me with this?
Here the 2 snippets that cause the errors:
function ImportJSONAdvanced(url, fetchOptions, query, parseOptions, includeFunc, transformFunc) {
var jsondata = UrlFetchApp.fetch(url, fetchOptions); *<--- ERROR OCCOURS HERE
var muteHttpExceptions = true;
var object = JSON.parse(jsondata.getContentText());
return parseJSONObject_(object, query, parseOptions, includeFunc, transformFunc);
}
function ImportJSON(url, query, parseOptions) {
return ImportJSONAdvanced(url, null, query, parseOptions, includeXPath_, defaultTransform_); // *<--- ERROR OCCOURS HERE
}