I want to add a script in Google Spreadsheets that adds new row on the second line of every sheet within a Google Spreadsheet that contains multiple spreadsheets.
This will need to happen every day.
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityTry this code:
function AddRow() {
//gets the spreadsheet which it's bound to
var ssheet = SpreadsheetApp.getActiveSpreadsheet();
//gets all sheets in this spreadsheet
var sheet = ssheet.getSheets();
//browses all the sheets, until "i" is larger than the number of sheets
for (var i = 0; i < sheet.length; i++)
{
//adds to the actual sheet a row AFTER the first row
sheet[i].insertRowAfter(1);
}
}
and trigger it on a daily basis (like on 1 a.m.)