bind office script to events
bind custom functions written with office scripts to events such as "onChanged" as described in the documentation for addins:
it's essential to enable automation
Thank you for the feedback.
Currently, events APIs are not supported within Office Scripts. One of the main reason is that events can be long running and scripts have a defined start and end points. Unlike an add-in, the script doesn’t stay in the background to listen in and act on the events.
Could you please let us know how you’d utilize events API support? That will definitely help us understand the requirement better.
I create Excel applications with rich, powerful user-interfaces. @Sudhi Ramamurthy, for you to ask, in 2020, why a programmer would want events in an application seems to be an incredibly foolish question. Event-driven programming has been the predominant paradigm in all programming of graphical user-interfaces for decades. Excel is a graphical user-interface, not just a number-cruncher.
YES, YES, YES.
i can't believe this suggestion only has 11 votes.
Also, PLZ GIVE US SHEET FUNCTIONS :)
OK, there are many technical reasons for developers, but at this point I would be happy just binding a script to a click or double-click event. For example filter a table based on clicking some cell and retrieving its value for use as a filter parameter. Hope it helps.
I wonder is the reason (in layman's terms) that Google sheets does have events, is because Google does not have the equivalent service to Power Automate? That is, is the reason, why Office Scripts does not have events, because of the existence of Power Automate??
I don't want to be mean, but I really hope office script can catch up with Google Apps Script (GAS). GAS supports events, on-change event, time-driven event, etc., which is really helpful. I use a google spreadsheet to fetch a website's information on a daily basis (time-driven) , when there is a change that meets my threshold (on change), it will call Gmail app to send me an email. None of these can be achieved currently via office script.
Binding to an event would be handy for example to populate automatically a "unique identifier" for a table in excel online. I'm inserting rows from a powerapps canvas app and have problems with the identifiers because of concurrency issues. I bet the problem would disappear if the unique identifier was set by a office script when a new row is added (as it's not allowed to have formulas in an excel file connected to a powerapps app)
Would I be able to do so with an Excel add-in?