Excel.WorksheetAddedEventArgs interface

Provides information about the worksheet that raised the Added event.

[ API set: ExcelApi 1.7 ]

Properties

source

Gets the source of the event. See Excel.EventSource for details.

[ API set: ExcelApi 1.7 ]

type

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

[ API set: ExcelApi 1.7 ]

worksheetId

Gets the id of the worksheet that is added to the workbook.

[ API set: ExcelApi 1.7 ]

Property Details

source

Gets the source of the event. See Excel.EventSource for details.

[ API set: ExcelApi 1.7 ]

source: Excel.EventSource | "Local" | "Remote";
Property Value
Excel.EventSource | "Local" | "Remote"

type

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

[ API set: ExcelApi 1.7 ]

type: "WorksheetAdded";
Property Value
"WorksheetAdded"

worksheetId

Gets the id of the worksheet that is added to the workbook.

[ API set: ExcelApi 1.7 ]

worksheetId: string;
Property Value
string

Examples

async function onWorksheetAdd(event) {
    await Excel.run(async (context) => {
        console.log("Handler for worksheet onAdded event has been triggered.  Newly added worksheet Id : " + event.worksheetId);
    });
}