Excel.WorksheetMovedEventArgs interface

Notifies when a worksheet is moved within a workbook.

If a worksheet is moved from one position within the workbook to another via the Excel UI, then this API will trigger an event. Note that if the position of a worksheet changes as a result of moving a different worksheet, then this event won't trigger for both position changes. This event only triggers for the primary worksheet move, and not any worksheet position changes that occur as a result of that primary move.

Remarks

[ API set: ExcelApi 1.17 ]

Properties

positionAfter

Gets the new position of the worksheet, after the move.

positionBefore

Gets the previous position of the worksheet, prior to the move.

source

The source of the event. It can be local or remote (through co-authoring).

type

Gets the type of the event.

worksheetId

Gets the ID of the worksheet that was moved.

Property Details

positionAfter

Gets the new position of the worksheet, after the move.

positionAfter: number;

Property Value

number

Remarks

[ API set: ExcelApi 1.17 ]

positionBefore

Gets the previous position of the worksheet, prior to the move.

positionBefore: number;

Property Value

number

Remarks

[ API set: ExcelApi 1.17 ]

source

The source of the event. It can be local or remote (through co-authoring).

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

Property Value

Excel.EventSource | "Local" | "Remote"

Remarks

[ API set: ExcelApi 1.17 ]

type

Gets the type of the event.

type: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.17 ]

worksheetId

Gets the ID of the worksheet that was moved.

worksheetId: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.17 ]