I am working on a Excel Web Add-In using Office.js. I added onSelectionChange event for a workbook and later trying to remove it, but this event still works. Here you can find an example that I created with ScriptLab, that shows that event can not be removed: https://gist.github.com/shss1985/afd1c00484acfec33740cdbcda3f78b5
Is there a way to remove it correctly?
Thanks.
To remove the handler you have to use the same RequestContext as was used to add it. For details about how you do this, see Remove an event handler.