none
setDataAsync fails with 5001 "Internal Error" RRS feed

  • Question

  • We have made a workbook app that creates some tables that are updated periodically when receiving data from an external feed. This is working fine until we activate another workbook. Then the method Binding.setDataAsync is failing with 5001 "Internal Error" until the workbook with the app receives focus again.

    As long as the workbook with the app was the last workbook to have focus, it works. If another workbook was the last to have focus, it doesn't work.

    Is this some kind of security restriction or is it a bug?

    Thursday, January 8, 2015 7:53 AM

All replies

  • Hi Sigbjørn Sønvisen,

    Thanks for posting in MSDN forum.

    I am trying to reproduce the issue however failed. The test steps like below:

    1. click a button which Call the setDataAsyc after 2S

    2. change the active workbook

    The method seems that not executed(no result, no error message, debug point didn't break). Did I misunderstood?

    Would you mind sharing with a sample to help us to reproduce this issue.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 20, 2015 7:52 AM
    Moderator
  • Thanks for your response, Fei!

    The easiest way to reproduce this issue is probably to use the sample "Apps for Office: Bind an app to a table inserted into Excel or Word" and then add the following line of code in the script UpdateTable.js (the line of code to add is the one that is underlined):

        // Create the binding to the table on the spreadsheet.
        function initializeBinding() {
            Office.context.document.bindings.addFromNamedItemAsync(
              tableName,
              Office.BindingType.Table,
              { id: bindingName },
              function (results) {
    
                  // Capture a reference to the binding and then add
                  // an event handler to the binding.
                  binding = results.value;
                  addBindingsHandler(function () { refreshData(); });
                  setInterval(function () { refreshData(); }, 3000);
              });
        }
    

    When you run it and click the button "Set binding" in the task pane, the bound table will be updated every third second, but if you open another Excel workbook it will fail. In this case it is caused by an error (5001 "Internal Error") when calling getDataAsync, but I guess it is the same problem as with setDataAsync.

    Regards Sigbjørn


    Wednesday, January 21, 2015 12:21 PM
  • Hi Sigbjørn,

    Thanks for the detail information. However the code works well for me. After I click the button "Set Binding", I opend second workbook and the data in first workbook still updates successfully.

    I suggest that you try to repair the Office or update it to the latest version to see wether the issue was fixed.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 22, 2015 7:56 AM
    Moderator