Home > Net >  the deleteRows function is populating my Google Sheet with 500 blank rows
the deleteRows function is populating my Google Sheet with 500 blank rows

Time:10-06

The below trigger works great, but when executed it repopulates my sheet with 500 rows. After the trigger is executed I need it to only show the 1st row.

function deleteRows() {
 var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet 1'); 

var start, howManyToDelete; 

start = 2;

howManyToDelete = sheet.getLastRow() - start   1;
}

CodePudding user response:

Answer in the comments from the original poster:

All good I solved the issue. I changed the 'start = 2;' to 'start = 3'. This generated the titles and only one empty row to begin working form

  • Related