Emma
Emma

Reputation: 11

Excel web add-in: How to detect ribbon click events?

I am working with the Excel JavaScript API and I am trying to trigger an event when the user clicks on any ribbon button or tab, and get which button or tab was clicked, but I couldn't find a way to do it.

Can anyone help me?

Upvotes: 1

Views: 507

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33094

This isn't a supported scenario in Office.js. Your add-in is running in a sandboxed environment (either within an IFRAME or an embedded browser, depending on the platform). Even in cases where the ribbon buttons are part of your add-in, the communication is one-way (clicking the button will trigger loading a page or firing a function from your add-in).

Upvotes: 1

Related Questions