Edit

Share via


Excel.WorkbookActivatedEventArgs interface

Provides information about the workbook that raised the activated event.

Remarks

[ API set: ExcelApi 1.13 ]

Examples

async function registerEventHandler() {
    await Excel.run(async (context) => {
        // Register the workbook activated event handler.
        const workbook = context.workbook;
        workbook.onActivated.add(workbookActivated);
        await context.sync();
    });
}

async function workbookActivated(event: Excel.WorkbookActivatedEventArgs) {
    await Excel.run(async (context) => {
        // Callback function for when the workbook is activated.
        console.log("The workbook was activated.");
    });
}

Properties

type

Gets the type of the event. See Excel.EventType for details.

Property Details

type

Gets the type of the event. See Excel.EventType for details.

type: "WorkbookActivated";

Property Value

"WorkbookActivated"

Remarks

[ API set: ExcelApi 1.13 ]