function myFunction() { var id="1TRd4ryhso1hRB7r8FNk0Uh5LPxe1kQ6QcNwu26kuKdI"; ex = SpreadsheetApp.openById(id); ex.insertSheet("an"); }