-
Notifications
You must be signed in to change notification settings - Fork 66
/
excel.worksheetaddedeventargs.yml
69 lines (61 loc) · 2.32 KB
/
excel.worksheetaddedeventargs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
### YamlMime:TSType
name: Excel.WorksheetAddedEventArgs
uid: 'excel!Excel.WorksheetAddedEventArgs:interface'
package: excel!
fullName: Excel.WorksheetAddedEventArgs
summary: Provides information about the worksheet that raised the added event.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
type: interface
properties:
- name: source
uid: 'excel!Excel.WorksheetAddedEventArgs#source:member'
package: excel!
fullName: source
summary: Gets the source of the event. See `Excel.EventSource` for details.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'source: Excel.EventSource | "Local" | "Remote";'
return:
type: '<xref uid="excel!Excel.EventSource:enum" /> | "Local" | "Remote"'
- name: type
uid: 'excel!Excel.WorksheetAddedEventArgs#type:member'
package: excel!
fullName: type
summary: Gets the type of the event. See `Excel.EventType` for details.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'type: "WorksheetAdded";'
return:
type: '"WorksheetAdded"'
- name: worksheetId
uid: 'excel!Excel.WorksheetAddedEventArgs#worksheetId:member'
package: excel!
fullName: worksheetId
summary: Gets the ID of the worksheet that is added to the workbook.
remarks: >-
\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/30-events/events-workbook-and-worksheet-collection.yaml
async function onWorksheetAdd(event) {
await Excel.run(async (context) => {
console.log(
"Handler for worksheet onAdded event has been triggered. Newly added worksheet Id : " +
event.worksheetId
);
});
}
```
isPreview: false
isDeprecated: false
syntax:
content: 'worksheetId: string;'
return:
type: string