What is the office setting limitation for Excel Add in

纵然是瞬间 提交于 2021-01-24 09:24:06

问题


I am using this OfficeJs API to save metadata associated with excel add in app, and I am wondering how big data the setting can support in Excel add in, we notice when the setting get to a few MB, it doesn't get saved. Office.context.document.settings.set('mySetting', 'mySetting value');


回答1:


Excel JS ever had a 2 MB limitation for the settings for each add-in, but this limitation was removed since office 2016 due to customer requests. therefore, right now, there should not have a limit for the settings, however, if you are working on Excel Online, there would be some size limitation on:

  1. Payload size limits Excel on the web has a payload size limit for requests and responses of 5MB. RichAPI.The error will be thrown if that limit is exceeded. so you may not be able to success when saving setting more than 5MB.

  2. File size limits for workbooks in SharePoint: Microsoft SharePoint has some file size limits for workbooks. When you upload an Excel for the web workbook to a SharePoint document library that's too large, it will either not open in a browser window, or let you edit or refresh data in the browser. To keep from consuming too much disk or memory space, Microsoft 365 SharePoint puts some file size limits on the files or workbooks you can upload and work with online.

Do you observe the error message? if yes, could you please share it with us? could you please share us the sample code, we would like to look into it. thanks.




回答2:


For Outlook add-ins the maximum size of the storage is 32 Kb. I suppose the same limitation exists for other Office applications.

However, you may consider using other possible techniques for storing your data. Use members of the Office JavaScript API that store data as either:

  • Custom XML stored in the document. See Excel.CustomXmlPart.
  • Use techniques provided by the underlying browser control: browser cookies, or HTML5 web storage (localStorage or sessionStorage).

Read more about that in the Persisting add-in state and settings article.



来源:https://stackoverflow.com/questions/62525186/what-is-the-office-setting-limitation-for-excel-add-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!