Reputation: 1
function onEdit(e){
e.range.getValue()
}
I am just trying to run a simple onEdit
code in Google Sheets, but the trigger execution log keep showing:
TypeError: Cannot read property 'getValue' of undefined at onEdit(Code:4:17)
Upvotes: 0
Views: 779
Reputation: 64062
Try running it this way:
Run test_onxxxEdit();
function test_onxxxEdit() {
const ss=SpreadsheetApp.getActive();
const sh=ss.getActiveSheet();
const rg=ss.getRange(?);
const v=rg.getValue();
onxxxEdit({source:ss,range:rg,value:v});
}
function onxxxEdit(e){
e.range.getValue()
}
Upvotes: 1