How do I take a 2d Array in google script and push the whole thing to a range in a spreadsheet?
Here is what I have:
Assume that array is created and filled and has 6000+ rows and 4 columns.
The following code gives me an incorrect range error.
Incorrect range width was 0 but should be 4 (line 56, file "Code"):
formatted.getRange(1,1,targetArray.length,targetArray[0].length).setValues(targetArray);
The following code functions but times out because the data set is too large:
for(var i=0; i<formattedSheetLength; i++)
formatted.getRange(i+1, 1, 1, 4).setValues([targetArray[i]]);
See Question&Answers more detail:os