function updateSheet() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); // Change to your sheet name sheet.getRange("A2").setValue(new Date()); // Example: Updates A2 with current date }