Excel Desktop - Office context document settings get didn t working

0 votes
The saved parameters were not retained when the Excel file was reopened. Office.context.document.settings.set('key', value) works for me. However, using Office.context.document.settings.get() to retrieve the settings didn't work.

I want the state to be saved so that we may access the saved values the next time we open the document.

I'm using the ordinary edition of Excel 2016. A version of the Build: (16.0.4266.1001) 64 bit
Feb 24, 2023 in Others by Kithuzzz
• 38,010 points
295 views

1 answer to this question.

0 votes

You need to call the saveAsync method of the Office.Settings interface to persist the in-memory copy of the settings property bag in the document.

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.

answered Feb 24, 2023 by narikkadan
• 63,420 points

Related Questions In Others

0 votes
1 answer

Language independent way to get "My Documents" folder in VBA Excel 2003

 Hello :)  This code may help you in your ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
569 views
0 votes
1 answer

How to create and download excel document using asp.net

First, download the Open XML Format SDK 2.0. It comes ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,420 points
2,480 views
0 votes
1 answer

How to get rid of a #value error in Excel?

Changing the format to "Number" doesn't actually ...READ MORE

answered Oct 3, 2022 in Others by narikkadan
• 63,420 points
461 views
0 votes
1 answer

Add .xll as AddIn to Excel

Hi, for adding an xll as Addln ...READ MORE

answered Feb 17, 2022 in Others by gaurav
• 23,260 points
943 views
0 votes
1 answer

JavaScript API does not work for Excel 2013?

Each method in the Office.js APIs is ...READ MORE

answered Sep 26, 2022 in Others by narikkadan
• 63,420 points
405 views
0 votes
1 answer

Embedding an excel document into an application with excel online

You have to do the heavy lifting ...READ MORE

answered Oct 2, 2022 in Others by narikkadan
• 63,420 points
676 views
0 votes
1 answer

Bloomberg excel add-in BDH

Change an override Fill=P to, for instance, ...READ MORE

answered Oct 11, 2022 in Others by narikkadan
• 63,420 points
2,044 views
0 votes
1 answer

How to get the JasperReports into Excel format with proper alignment

Remove at least one parameter: exporter.setParameter(JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN,Boolean.TRUE) Note that JRXlsExportParameter is deprecated the correct ...READ MORE

answered Sep 21, 2022 in Others by narikkadan
• 63,420 points
3,170 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP