1

We are currently trying to developing an Excel web Add-in (Excel Office add-in).

While development, we came across a requirement to preserve current user's details in the add-in (from a third-party login inside add-in) like userID, userName, etc.

GOAL:

The goal is to save excel add-in user-related settings most preferably into the application's settings. Project -> Properties -> Settings

WHAT WE TRIED:

Tried Office.Settings interface: We created and saved a sample setting(using settings.set() and saveAsync() methods respectively). According to the saveAsync() documentation:

Any settings previously saved by an add-in are loaded when it is initialized, so during the lifetime of the session you can just use the set and get methods to work with the in-memory copy of the settings property bag. When you want to persist the settings so that they are available the next time the add-in is used, use the saveAsync method.

But in our case, after saving the settings (using saveAsync) and reading the settings (after excel restart) with refreshAsync(), we are still getting null value.

Office.context.document.settings.refreshAsync(function(){
Office.context.document.settings.get('mySetting');});

After crawling more on the internet, we got this link but it didn't help much to persist the settings.

Can anybody guide us, how we can save Excel web add-in settings somewhere?

Ank Raw
  • 155
  • 10

0 Answers0