-
Notifications
You must be signed in to change notification settings - Fork 64
/
excel.worksheetchangedeventargs.yml
149 lines (144 loc) · 5.87 KB
/
excel.worksheetchangedeventargs.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
### YamlMime:TSType
name: Excel.WorksheetChangedEventArgs
uid: 'excel!Excel.WorksheetChangedEventArgs:interface'
package: excel!
fullName: Excel.WorksheetChangedEventArgs
summary: Provides information about the worksheet that raised the changed event.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
type: interface
properties:
- name: address
uid: 'excel!Excel.WorksheetChangedEventArgs#address:member'
package: excel!
fullName: address
summary: Gets the range address that represents the changed area of a specific worksheet.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'address: string;'
return:
type: string
- name: changeType
uid: 'excel!Excel.WorksheetChangedEventArgs#changeType:member'
package: excel!
fullName: changeType
summary: Gets the change type that represents how the changed event is triggered. See `Excel.DataChangeType` for details.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
changeType: Excel.DataChangeType | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" | "ColumnInserted" |
"ColumnDeleted" | "CellInserted" | "CellDeleted";
return:
type: >-
<xref uid="excel!Excel.DataChangeType:enum" /> | "Unknown" | "RangeEdited" | "RowInserted" | "RowDeleted" |
"ColumnInserted" | "ColumnDeleted" | "CellInserted" | "CellDeleted"
- name: details
uid: 'excel!Excel.WorksheetChangedEventArgs#details:member'
package: excel!
fullName: details
summary: >-
Represents the information about the change detail. This property can be retrieved when the changed event is
triggered on a single cell. If the changed event is triggered on multiple cells, this property cannot be
retrieved.
remarks: |-
\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// This function would be used as an event handler for the Worksheet.onChanged event.
async function onWorksheetChanged(eventArgs) {
await Excel.run(async (context) => {
const details = eventArgs.details;
const address = eventArgs.address;
// Print the before and after types and values to the console.
console.log(`Change at ${address}: was ${details.valueBefore}(${details.valueTypeBefore}),`
+ ` now is ${details.valueAfter}(${details.valueTypeAfter})`);
await context.sync();
});
}
```
isPreview: false
isDeprecated: false
syntax:
content: 'details: Excel.ChangedEventDetail;'
return:
type: '<xref uid="excel!Excel.ChangedEventDetail:interface" />'
- name: source
uid: 'excel!Excel.WorksheetChangedEventArgs#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.WorksheetChangedEventArgs#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: "WorksheetChanged";'
return:
type: '"WorksheetChanged"'
- name: worksheetId
uid: 'excel!Excel.WorksheetChangedEventArgs#worksheetId:member'
package: excel!
fullName: worksheetId
summary: Gets the ID of the worksheet in which the data changed.
remarks: '\[ [API set: ExcelApi 1.7](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'worksheetId: string;'
return:
type: string
methods:
- name: getRange(ctx)
uid: 'excel!Excel.WorksheetChangedEventArgs#getRange:member(1)'
package: excel!
fullName: getRange(ctx)
summary: |-
Gets the range that represents the changed area of a specific worksheet.
\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getRange(ctx: Excel.RequestContext): Excel.Range;'
parameters:
- id: ctx
description: ''
type: '<xref uid="excel!Excel.RequestContext:class" />'
return:
type: '<xref uid="excel!Excel.Range:class" />'
description: ''
- name: getRangeOrNullObject(ctx)
uid: 'excel!Excel.WorksheetChangedEventArgs#getRangeOrNullObject:member(1)'
package: excel!
fullName: getRangeOrNullObject(ctx)
summary: |-
Gets the range that represents the changed area of a specific worksheet. It might return null object.
\[ [API set: ExcelApi 1.8](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getRangeOrNullObject(ctx: Excel.RequestContext): Excel.Range;'
parameters:
- id: ctx
description: ''
type: '<xref uid="excel!Excel.RequestContext:class" />'
return:
type: '<xref uid="excel!Excel.Range:class" />'
description: ''