0
votes

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?

1
Hi Sameera, one of our PM would like to contact you about this issue. Could you please send an email to [email protected]? - Gab Royer
Sure, Gab. Will do. - Sameera

1 Answers

0
votes

Just wanted to close the loop on this question saying that this was a bug in Office API and has since been fixed.