I have some question, hope guys can answer me. In this following function, I can't understand event 'e'. What is the 'e'? how we call the function or where's the function called? Give me some example, please!
function my_on_edit(e) {
var s = findSheetById_(e.gridId);
var r = e.range;
s.getRange(r.rowStart, r.columnEnd+1).setValue( s.getName() );
}
function findSheetById_(id) {
var sheets = SpreadsheetApp.getActive().getSheets();
for( var i in sheets )
if( sheets[i].getSheetId() == id )
return sheets[i];
throw 'Unable to find sheet with id: '+id;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…