Open demyte opened 4 months ago
Hi @demyte Thanks for reporting this issue. I can repro this issue and we'll be looking into this and report back if we have a suggestion for you. Thanks.
Hi @shanshanzheng-dev
I am really looking to get a resolution to this issue as our app relies heavily on these events, especially onSelectionChanged
and onFormulaChanged
.
This issue is bleeding out into an really painful issue where these events just stop firing on subsequent workbook loads and users have to use the inbuilt taskpane menu to reload the addin to get them working again.
This is such a bad experience for our users and really undermines their confidence in our product and even though its an issue with Excel/OfficeJS, they do not see it that way.
Can you please let me know what we can do to expidite a resolution for this?
Hi @demyte sorry for convenience. We're actively investigating these two issues. We'll update once we have a solution. Thanks for your patience.
We are having an event binding issue within our Excel Addin which uses customfunctions and the shared runtime.
If a subsequent workbook is opened that has the custom functions on it, if we try to unbind our events, it fails with an error.
If the subsequent workbook opened is a blank workbook or doesn't have custom functions in it, it all works fine.
A github repo, instructions to replicate and a video are available below.
Your Environment
Expected behavior
When
<event>.remove()
is called within its context, as per the code below, it should always unbind.Current behavior
When opening a 2nd workbook in excel that has customfunctions on it with a sharedruntime, event binding loses the context so unbinding events fail and re-binding events can cause multiple events to be bound.
So in the code above in
Expected Behaviour
, the event never unbinds and duplicate events can be boundSteps to reproduce
build:dev
start:desktop
\docs\singlefunction.xlsx
Unbind
button in the task paneRebind
and click on cells and now 4 events are bound as shown in the console:Context
Useful logs
Video:
https://github.com/user-attachments/assets/1e55b158-23cc-4b77-8eb5-46cc2c81fcda
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.