Excel.TableSelectionChangedEventArgs interface
提供有关引发所选内容更改事件的表的信息。
注解
属性
| address | 获取区域地址,该地址表示特定工作表上的表格选定区域。 |
| is |
指定所选内容是否位于表中。
|
| table |
获取更改所选内容的表的 ID。 |
| type | 获取事件的类型。 有关详细信息,请参阅 |
| worksheet |
获取选定内容已更改的工作表的 ID。 |
属性详细信息
address
获取区域地址,该地址表示特定工作表上的表格选定区域。
address: string;
属性值
string
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/30-events/events-table-changed.yaml
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 必须设置为 true ,地址才能有用。
isInsideTable: boolean;
属性值
boolean
注解
tableId
type
获取事件的类型。 有关详细信息,请参阅 Excel.EventType。
type: "TableSelectionChanged";
属性值
"TableSelectionChanged"