Excel.SettingsChangedEventArgs interface
Provides information about the setting that raised the settings changed event
Remarks
Examples
async function registerSettingsChangedHandler() {
await Excel.run(async (context) => {
// Register the onChanged setting event handler on the workbook.
const settings = context.workbook.settings;
settings.onSettingsChanged.add(onChangedSetting);
await context.sync();
});
}
async function onChangedSetting(args: Excel.SettingsChangedEventArgs) {
await Excel.run(async (context) => {
const changedSetting = args.settings.getItem("NeedsReview");
changedSetting.load("value");
// Must sync with the context in the EventArgs object,
// not the context that Office passes to Excel.run.
await args.settings.context.sync();
console.log("Setting value is: " + changedSetting.value);
await context.sync();
});
}
Properties
| settings | Gets the |
Property Details
settings
Gets the Setting object that represents the binding that raised the settings changed event
settings: Excel.SettingCollection;