OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
690 stars 95 forks source link

Excel Web Only Issue: Existing bindings are not working in Excel Web when tried to reload and add a listener to them #5141

Open SenMS-CSA opened 2 hours ago

SenMS-CSA commented 2 hours ago

Added few cell change bindings with onDataChanged event, the binding will exist forever and whenever user starts the add-in again the bindings will be reloaded using bindings.load("items") and added the event listeners to them, this perfectly working in Excel Desktop but not working in Excel Web

Your Environment

Expected behavior

The bindings should work with event listener added back to them. If the user tries to change the cell value, the onDataChanged event added back should trigger

Current behavior

The event is not triggering and throwing an error image

The events should trigger and execute

Steps to reproduce

1.Create a binding with onDataChanged event listener

  1. Close the workbook and open again
  2. run the code, execute a reload method for all existing bindings and add onDataChanged listeners using a button click

Link to live example(s)

https://github.com/SenMS-CSA/ExcelWebBindingsIssue/blob/main/Codesnippet

Provide additional details

Added the error screen shot

Context

The issue affects because the bindings have to be deleted and recreated every time rather than reusing it

Useful logs

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.

microsoft-github-policy-service[bot] commented 2 hours ago

Thank you for letting us know about this issue. We will take a look shortly. Thanks.