Subscribes to the specified event and calls the callback function when the event fires.
Name | Type | Description |
eventName | string | The event name. |
callback | function | Function to be called when the event fires. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); var oRange = oWorksheet.GetRange("A1"); oRange.SetValue("1"); Api.attachEvent("onWorksheetChange", function(oRange){ console.log("onWorksheetChange"); console.log(oRange.GetAddress()); }); builder.SaveFile("xlsx", "attachEvent.xlsx"); builder.CloseFile();