I came across the following issue when I am trying to work on Query data (data resulting from query function in Google Sheet) using Apps Script:
var summe = 0;
for (i=0;i<data.length;i++) {
for (k=0;k<data[i].length;k++){
summe = summe + data[i][k];
console.log(...); # to track exactly which column's value becomes text
console.log(summe);
}
The results in execution log show that from a certain point it starts to concate text instead of summing up values: enter image description here
Appreciate a lot in advance for any help or ideas out there!!!
Best regards, Xubo
summe = summe + Number(data[i][k]);
See Number.