Excel cell binding events not triggering after reopen of the workbook
Hi,
I created few cell onDataChange events but they are not triggering when closed and reopened the workbook but the bindings are stored in the workbook and I am able to see them in the excel and iterate through code as well.
Below is the code sample
Office.onReady((info) => { // Check that we loaded into Excel if (info.host === Office.HostType.Excel) { loadBinding(); }});function loadBinding() { Excel.run(async (context) => { // sample code goes here const cellAddressRange = context.workbook.getSelectedRange(); cellAddressRange.load("address"); await context.sync(); console.log(cellAddressRange.address); const bindingId = "binding_" + Math.random().toString(36).substr(2, 9); const binding = context.workbook.bindings.add( cellAddressRange, Excel.BindingType.range, bindingId ); binding.onDataChanged.add(async (eventArgs) => { try { console.log("cell value updated event handler called."); const range = eventArgs.binding.getRange(); console.log(range); range.load("address,values"); await context.sync(); console.log(range.address, range.values[0][0]); } catch (error) { errorHandlerFunction(error); } }); await context.sync(); }).catch(errorHandlerFunction);}function errorHandlerFunction(error) { console.error(error);}