You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Numbers such as prices.usd and edhrec_rank should be type cast to numbers. Failure to do so breaks a couple things in Google Sheets:
"Number" formatting won't be applied, including the dollar sign and commas.
Functions which compare numbers won't work, such as GTE (greater than or equal).
There are similar problems with empty strings, Booleans, and dates.
To fix this, I recommend replacing lines 90 and 91 as follows:
if (typeof val === "string") {
if(val == "") {
val = null;
} else if(val == "TRUE"){
val = true;
} else if(val == "FALSE"){
val = false;
} else if(!isNaN(val) && !isNaN(parseFloat(val))){
val = +val;
} else {
let d = val.match(/^\d{4}-\d{2}-\d{2}$/);
if(d) {
val = new Date(val);
} else {
// add extra line breaks for readability
val = val.replace(/\n/g, "\n\n");
}
}
}
The text was updated successfully, but these errors were encountered:
Numbers such as
prices.usd
andedhrec_rank
should be type cast to numbers. Failure to do so breaks a couple things in Google Sheets:There are similar problems with empty strings, Booleans, and dates.
To fix this, I recommend replacing lines 90 and 91 as follows:
The text was updated successfully, but these errors were encountered: