I'm trying to add rows to a spreadsheet through an adwords script which runs every day.
Some of the code so far is:
var report_iter = AdWordsApp.report(
'SELECT ' + columns_str +
'FROM ACCOUNT_PERFORMANCE_REPORT ' +
'DURING YESTERDAY', {
apiVersion: 'v201302'
}
).rows();
while(report_iter.hasNext()) {
var row = report_iter.next();
var row_array = [""]; // This is deliberate to include an empty cell in column A in the spreadsheet.
for(var i in columns) {
row_array.push(row[columns[i]]);
}
sheet.appendRow(row_array);
}
It is working properly, however, it has some unwanted outcomes as well. What I want to stop is every time I append a row to the bottom of the spreadsheet, it also appends 50 other rows of blank cells. Then, the next time I append a row, it appends it to the bottom of the spreadsheet, 50 rows after the one before... Is there any way to stop this. I had a look at using feed lists but I don't know how to do that or if you can with adwords scripts.
The only other thing I was thinking was to add a new row to the bottom every time, find the row number, then get the row number and insert a row.