detachEvent
function detachEvent(eventName: string = null): void
Description
Unsubscribes from the specified event.
Parameters
- eventName
string
null The event name.
Returns
void
Try It
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1");
oRange.SetValue("1");
Api.attachEvent("onWorksheetChange", function(oRange){
console.log("onWorksheetChange");
console.log(oRange.GetAddress());
});
Api.detachEvent("onWorksheetChange");