问题
We are using Office js library to render data on excel. There are more than 2000 rows that works fine on Desktop Excel. But when same API is used on Chrome office 365 it gives error message "There was an error processing the request."
Please see attached screenshot.
As data get larger Chrome Office excel is not able to render data. Please help us as this is blocker in our application and our production is getting effected.
回答1:
There are 2 limitations when interacting with Excel workbook When you're building an Excel add-in
- Excel on the web has a payload size limit for requests and responses of 5MB. RichAPI.Error will be thrown if that limit is exceeded.
- A range is limited to five million cells for get operations.
Based on your description, it looks to me that you are hitting payload size issue. I would suggest to check the data before calling context.sync(). Split the operation into smaller pieces as needed. Be sure to call context.sync() for each sub-operation to avoid those operations getting batched together again.
Another tip is to leverage RangeAreas to strategically update cells within a larger range. See Work with multiple ranges simultaneously in Excel add-ins for more information.
来源:https://stackoverflow.com/questions/63599988/data-get-render-on-desktop-excel-using-office-js-but-on-chrome-office-365-its-g