Settings.settingsChanged event (JavaScript API for Office)

apps for Office

Occurs when the in-memory copy of the settings property bag is saved into the document with the Settings.saveAsync method.

Last modified: March 19, 2015

Hosts:

Excel,

Available in Requirement set

Settings

Last changed in

1.0

See all support details

Office.EventType.SettingsChanged

To add an event handler for the settingsChanged event, use the addHandlerAsync method of the Settings object.

The settingsChanged event fires only when your app's script calls the Settings.saveAsync method to persist the in-memory copy of the settings into the document file. The settingsChanged event is not triggered when the Settings.set or Settings.remove methods are called.

The settingsChanged event was designed to let you to handle potential conflicts when two or more users are attempting to save settings at the same time when your app is used in a shared (co-authored) document.

Important note Important

Your app's code can register a handler for the settingsChanged event when the app is running with any Excel client, but the event will fire only when the app is loaded with a spreadsheet that is opened in Excel Online, and more than one user is editing the spreadsheet (co-authoring). Therefore, effectively the settingsChanged event is supported only in Excel Online in co-authoring scenarios.

A checkmark (√) in the following matrix indicates that this event is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this event.

For more information about Office host application and server requirements, see Requirements for running apps for Office.

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

Excel

Available in requirement sets

Settings

Minimum permission level

Restricted

App types

Content, task pane

Library

Office.js

Namespace

Office

Version

Changes

1.0

Introduced

Show:
© 2015 Microsoft