Excel.TableSelectionChangedEventArgs interface

提供有关引发了 SelectionChanged 事件的表的信息。Provides information about the table that raised the SelectionChanged event.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

属性

address

获取区域地址,该地址表示特定工作表上的表格选定区域。Gets the range address that represents the selected area of the table on a specific worksheet.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

isInsideTable

指示选定区域是否在表格内,如果 IsInsideTable 为 false,则地址无效。Indicates if the selection is inside a table, address will be useless if IsInsideTable is false.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

tableId

获取其中的选定区域发生更改的表格 ID。Gets the id of the table in which the selection changed.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

type

获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details. 只读。Read-only.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

worksheetId

获取其中的选定区域发生更改的工作表的 ID。Gets the id of the worksheet in which the selection changed.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

属性详细信息

address

获取区域地址,该地址表示特定工作表上的表格选定区域。Gets the range address that represents the selected area of the table on a specific worksheet.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

address: string;

属性值

string

示例Examples

async function onSelectionChange(args) {
    await Excel.run(async (context) => {
        console.log("Handler for table onSelectionChanged event has been triggered. The new selection is: " + args.address);
    });
}

isInsideTable

指示选定区域是否在表格内,如果 IsInsideTable 为 false,则地址无效。Indicates if the selection is inside a table, address will be useless if IsInsideTable is false.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

isInsideTable: boolean;

属性值

boolean

tableId

获取其中的选定区域发生更改的表格 ID。Gets the id of the table in which the selection changed.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

tableId: string;

属性值

string

type

获取事件的类型。Gets the type of the event. 有关详细信息,请参阅 Excel.EventType。See Excel.EventType for details. 只读。Read-only.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

type: "TableSelectionChanged";

属性值

"TableSelectionChanged"

worksheetId

获取其中的选定区域发生更改的工作表的 ID。Gets the id of the worksheet in which the selection changed.

[API 集: ExcelApi 1.7][ API set: ExcelApi 1.7 ]

worksheetId: string;

属性值

string