Compartir vía


Excel.SettingsChangedEventArgs interface

Proporciona información sobre la configuración que generó el evento de cambio de configuración.

Comentarios

[ Conjunto de API: ExcelApi 1.4 ]

Ejemplos

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();
    });
} 

Propiedades

settings

Obtiene el Setting objeto que representa el enlace que generó el evento de cambio de configuración.

Detalles de las propiedades

settings

Obtiene el Setting objeto que representa el enlace que generó el evento de cambio de configuración.

settings: Excel.SettingCollection;

Valor de propiedad

Comentarios

[ Conjunto de API: ExcelApi 1.4 ]