does anyone know the way to publish/write data from an array of js objects from an adwords script to a google sheet?
right now i am doing it one row at a time and its really slow. you can sit there and watch the rows being inserted one by one. i know this is not the most efficient or even preferred way google wants this to happen.
here is my code i am currently using (the snippet in question anyway). I have an array named "queries" that is an array of query objects and then i use the setValue sheet method to write the values in each cell of each row. I am thinking there is some method in the sheet class that will do this all at once.
for (i=0; i < queries.length; i++) {
var row = i+2;
sheet.getRange("A" + row).setValue(queries[i].AdGroupName);
sheet.getRange("B" + row).setValue(queries[i].CampaignName);
sheet.getRange("C" + row).setValue(queries[i].Keyword);
sheet.getRange("D" + row).setValue(queries[i].MatchType);
sheet.getRange("E" + row).setValue(queries[i].Query);
sheet.getRange("F" + row).setValue(queries[i].Impressions);
sheet.getRange("G" + row).setValue(queries[i].Clicks);
sheet.getRange("H" + row).setValue(queries[i].Cost);
sheet.getRange("I" + row).setValue(queries[i].Conversions);
sheet.getRange("J" + row).setValue(queries[i].CostPerConversion);
sheet.getRange("K" + row).setValue(myDate);
}