We have built a Excel Task Pane add-in that primarily works with Tables. We have some code that executes on office.initalize and attaches event handlers to existing bindings that we've created previously. The code is pretty straightforward (in TypeScript):
document.bindings.getAllAsync(null, bindingResult => {
let bindings = <Office.Binding[]>bindingResult.value;
if (bindings) {
bindings.forEach(b => {
// Only attach to our bindings
if (b.id.indexOf(Table.bindingPrefix) == 0)
me.attachHandler(b);
});
}
});
attachHandler = (binding: Office.Binding) => {
let eventType = Office.EventType.BindingSelectionChanged;
binding.addHandlerAsync(
eventType,
this.onBindingSelectionChanged,
null,
asyncResult => this.onHandlerAdded(eventType, asyncResult)
);
}
This code has worked fine for us in the past for Office Online and Desktop. However, we modified our manifest to include an Add-in command (which simply opens the task pane) by modifying the sample Add-in command manifest. Now the above code fails in Office Online with the error:
error: OSF.DDA.Error
code: 5001
message:"An internal error has occurred."
name:"Internal Error"
status:"failed"
The same manifest works on Office client for the desktop. And our old manifest that does not include add-in commands still work on both the desktop and online. Which means that this seems specific to add-in commands + office online. Is there a way around this?