TypeError: Cannot call method "getActiveSheet" of null
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().getRange("D2").setValue(99)
Please look into the screenshot All i want to set the value into the sheet with given range.
Code.gs
sheat01
Here is the code
function myF() {
var app = SpreadsheetApp;
var g_as = app.getActiveSpreadsheet();
var as = g_as.getActiveSheet();
as.getRange("D2").setValue(99);
}