none
Office.js binding issues in Excel Add-in RRS feed

  • Question

  • Dear Team,

    We are developing Excel Add-ins using Angular 6 and Office.js, we have few sporadic issue in the applications, sometimes the binding to few tables fails and write and read operation will keep failing there after. As work around we were deleting the IE cache, Office Cache and Temp folder and reloading the Add-in, last time when I had similar issues it did not work will above steps. I forced my self to restart my system, there after it started working as expected without any issues.

    With my experience I have got the below questions:

    • When we develop the Excel Web Add-ins, how the cache is handled?.
    • How to ensure the office cache is cleared each time when I start my session in the Excel-AddIn.
    • How are the these Temp, IE Cache and Office cache are related in the concept of Excel AddIn.
    • I have used the below code to write the content to excel sheet.
            
    private addRows(tableName: string, rows: any) {
        this.workbook.bindings.getByIdAsync(tableName,
            {},
            (result: Office.AsyncResult) => {
                var binding = result.value;
                var rowsData: any[] = [];
                for (var r = 0; r < rows.length; r++) {
                    rowsData[r] = [];
                    rowsData[r][0] = rows[r].year;
                    rowsData[r][1] = rows[r].Description;
                }
                binding.addRowsAsync(rowsData,
                    (result: Office.AsyncResult) => {
                        if (result.status === Office.AsyncResultStatus.Failed) {
                            this.toastr.error('Binding failed for table: ' + tableName, 'Error');
                        }
                    });

    Wednesday, February 27, 2019 8:00 AM

Answers

All replies