2

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');

Wei Meng
  • 43
  • 3

2 Answers2

2

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.

Raymond Lu
  • 2,178
  • 1
  • 6
  • 19
  • 1
    We have a setting about 8MB to save, when we call Office.context.document.settings.saveAsync(callbackFunc) to save the setting to the property bag , the call back function returns an error on Online Excel, but it shows success for Desktop Excel. But when we reopen the add in, try to read the setting Office.context.document.settings.get(), I get an empty setting from Desktop Excel. That is the issue we are observing now. – Wei Meng Jun 23 '20 at 14:34
  • 1
    are you able to reproduce the above issue? If not, we can try to create some code to reproduce the issue, – Wei Meng Jun 26 '20 at 13:09
  • it would be super helpful if you could share the sample code. Thanks in advance – Raymond Lu Jun 26 '20 at 13:24
1

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:

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

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45