-
Notifications
You must be signed in to change notification settings - Fork 66
/
excel.tablechangedeventargs.yml
219 lines (188 loc) · 7.84 KB
/
excel.tablechangedeventargs.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
### YamlMime:TSType
name: Excel.TableChangedEventArgs
uid: 'excel!Excel.TableChangedEventArgs:interface'
package: excel!
fullName: Excel.TableChangedEventArgs
summary: Provides information about the table 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.TableChangedEventArgs#address:member'
package: excel!
fullName: address
summary: Gets the address that represents the changed area of a table on 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.TableChangedEventArgs#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.TableChangedEventArgs#details:member'
package: excel!
fullName: details
summary: >-
Gets 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
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/30-events/data-change-event-details.yaml
async function onTableChanged(eventArgs: Excel.TableChangedEventArgs) {
await Excel.run(async (context) => {
const details = eventArgs.details;
const address = eventArgs.address;
console.log(`Change at ${address}: was ${details.valueBefore}(${details.valueTypeBefore}),`
+ ` now is ${details.valueAfter}(${details.valueTypeAfter})`);
});
}
```
isPreview: false
isDeprecated: false
syntax:
content: 'details: Excel.ChangedEventDetail;'
return:
type: '<xref uid="excel!Excel.ChangedEventDetail:interface" />'
- name: source
uid: 'excel!Excel.TableChangedEventArgs#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: tableId
uid: 'excel!Excel.TableChangedEventArgs#tableId:member'
package: excel!
fullName: tableId
summary: Gets the ID of the table in which the data changed.
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-tablecollection-changed.yaml
async function onChange(event) {
await Excel.run(async (context) => {
let table = context.workbook.tables.getItem(event.tableId);
let worksheet = context.workbook.worksheets.getItem(event.worksheetId);
worksheet.load("name");
await context.sync();
console.log("Handler for table collection onChanged event has been triggered. Data changed address: " + event.address);
console.log("Table Id : " + event.tableId);
console.log("Worksheet Id : " + worksheet.name);
});
}
```
isPreview: false
isDeprecated: false
syntax:
content: 'tableId: string;'
return:
type: string
- name: type
uid: 'excel!Excel.TableChangedEventArgs#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: "TableChanged";'
return:
type: '"TableChanged"'
- name: worksheetId
uid: 'excel!Excel.TableChangedEventArgs#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) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/30-events/events-tablecollection-changed.yaml
async function onChange(event) {
await Excel.run(async (context) => {
let table = context.workbook.tables.getItem(event.tableId);
let worksheet = context.workbook.worksheets.getItem(event.worksheetId);
worksheet.load("name");
await context.sync();
console.log("Handler for table collection onChanged event has been triggered. Data changed address: " + event.address);
console.log("Table Id : " + event.tableId);
console.log("Worksheet Id : " + worksheet.name);
});
}
```
isPreview: false
isDeprecated: false
syntax:
content: 'worksheetId: string;'
return:
type: string
methods:
- name: getRange(ctx)
uid: 'excel!Excel.TableChangedEventArgs#getRange:member(1)'
package: excel!
fullName: getRange(ctx)
summary: |-
Gets the range that represents the changed area of a table on 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.TableChangedEventArgs#getRangeOrNullObject:member(1)'
package: excel!
fullName: getRangeOrNullObject(ctx)
summary: |-
Gets the range that represents the changed area of a table on 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: ''