var resultasarray = [];
while (TableData.next()) {
for (var j = 0; j < numberOfColumns; j++) {
resultasarray[i][j] = TableData.getString(j+1));
}
i++;
}
threw errors, TypeError: Cannot read properties of undefined (reading '0')
Using push() instead, worked.
var resultasarray = [];
while (TableData.next()) {
var rowvals = [];
for (var j = 0; j < numberOfColumns; j++) {
rowvals.push(TableData.getString(j+1));
//Logger.log(TableData.getString(j+1))
}
resultasarray.push(rowvals)
i++;
}
No comments:
Post a Comment