Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Excel.WorksheetNameChangedEventArgs interface
- Package:
- excel
Provides information about the worksheet whose name has changed.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/30-events/events-worksheet.yaml
async function onNameChanged(event: Excel.WorksheetNameChangedEventArgs) {
await Excel.run(async (context) => {
console.log(`Handler for worksheet onNameChanged event has been triggered.`);
console.log(` Name before change: ` + event.nameBefore);
console.log(` Name after change: ` + event.nameAfter);
});
}
Properties
| nameAfter | Gets the new name of the worksheet, after the name change. |
| nameBefore | Gets the previous name of the worksheet, before the name changed. |
| 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 with the new name. |
Property Details
nameAfter
Gets the new name of the worksheet, after the name change.
nameAfter: string;
Property Value
string
Remarks
nameBefore
Gets the previous name of the worksheet, before the name changed.
nameBefore: string;
Property Value
string
Remarks
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
type
worksheetId
Gets the ID of the worksheet with the new name.
worksheetId: string;
Property Value
string
Remarks
Office Add-ins
Feedback
Was this page helpful?
