Excel.TableSelectionChangedEventArgs interface
Provides information about the table that raised the selection changed event.
Remarks
Properties
address | Gets the range address that represents the selected area of the table on a specific worksheet. |
is |
Specifies if the selection is inside a table. |
table |
Gets the ID of the table in which the selection changed. |
type | Gets the type of the event. See |
worksheet |
Gets the ID of the worksheet in which the selection changed. |
Property Details
address
Gets the range address that represents the selected area of the table on a specific worksheet.
address: string;
Property Value
string
Remarks
Examples
// 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
Specifies if the selection is inside a table. IsInsideTable
must be set to true
for the address to be useful.
isInsideTable: boolean;
Property Value
boolean
Remarks
tableId
Gets the ID of the table in which the selection changed.
tableId: string;
Property Value
string
Remarks
type
Gets the type of the event. See Excel.EventType
for details.
type: "TableSelectionChanged";
Property Value
"TableSelectionChanged"
Remarks
worksheetId
Gets the ID of the worksheet in which the selection changed.
worksheetId: string;
Property Value
string
Remarks
Office Add-ins