exceloffice-jsoffice-addinsoffice-js-helpers

Can Events in Excel be registered without a button click?


I am trying to create events that are registered when the Excel add-in is first loaded up. I'm not sure how to get around this since I've only seen examples where they are registered with a button click.


Solution

  • You can put the handler registration in the Office.onReady or Office.initialize method. For an example, see Change the state in response to an event.