I have a google spreadsheet that contains around 50 to 60 sheets. I am trying to get the names of all those sheets, and put them into another spreadsheet.
So far I have written the following code
function myfunction(){
var ss = SpreadsheetApp.openById("abck12345");
var sheetCount = ss.getSheets().length;
var i=0;
var sheetlist;
while(i<sheetCount){
sheetlist = ss.getSheets()[i];
Logger.log(sheetlist);
}
}
While executing this i am getting an error "Exceeded maximum execution time"