-
Notifications
You must be signed in to change notification settings - Fork 63
/
word.tablecell.yml
696 lines (646 loc) · 28 KB
/
word.tablecell.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
### YamlMime:TSType
name: Word.TableCell
uid: 'word!Word.TableCell:class'
package: word!
fullName: Word.TableCell
summary: Represents a table cell in a Word document.
remarks: >-
\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml
// Gets content alignment details about the first cell of the first table in the document.
await Word.run(async (context) => {
const firstTable: Word.Table = context.document.body.tables.getFirst();
const firstTableRow: Word.TableRow = firstTable.rows.getFirst();
const firstCell: Word.TableCell = firstTableRow.cells.getFirst();
firstCell.load(["horizontalAlignment", "verticalAlignment"]);
await context.sync();
console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`);
});
```
isPreview: false
isDeprecated: false
type: class
properties:
- name: body
uid: 'word!Word.TableCell#body:member'
package: word!
fullName: body
summary: Gets the body object of the cell.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly body: Word.Body;'
return:
type: '<xref uid="word!Word.Body:class" />'
- name: cellIndex
uid: 'word!Word.TableCell#cellIndex:member'
package: word!
fullName: cellIndex
summary: Gets the index of the cell in its row.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly cellIndex: number;'
return:
type: number
- name: columnWidth
uid: 'word!Word.TableCell#columnWidth:member'
package: word!
fullName: columnWidth
summary: Specifies the width of the cell's column in points. This is applicable to uniform tables.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'columnWidth: number;'
return:
type: number
- name: context
uid: 'word!Word.TableCell#context:member'
package: word!
fullName: context
summary: >-
The request context associated with the object. This connects the add-in's process to the Office host
application's process.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'context: RequestContext;'
return:
type: '<xref uid="word!Word.RequestContext:class" />'
- name: horizontalAlignment
uid: 'word!Word.TableCell#horizontalAlignment:member'
package: word!
fullName: horizontalAlignment
summary: 'Specifies the horizontal alignment of the cell. The value can be ''Left'', ''Centered'', ''Right'', or ''Justified''.'
remarks: >-
\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml
// Gets content alignment details about the first cell of the first table in the document.
await Word.run(async (context) => {
const firstTable: Word.Table = context.document.body.tables.getFirst();
const firstTableRow: Word.TableRow = firstTable.rows.getFirst();
const firstCell: Word.TableCell = firstTableRow.cells.getFirst();
firstCell.load(["horizontalAlignment", "verticalAlignment"]);
await context.sync();
console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`);
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";'
return:
type: '<xref uid="word!Word.Alignment:enum" /> | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"'
- name: parentRow
uid: 'word!Word.TableCell#parentRow:member'
package: word!
fullName: parentRow
summary: Gets the parent row of the cell.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly parentRow: Word.TableRow;'
return:
type: '<xref uid="word!Word.TableRow:class" />'
- name: parentTable
uid: 'word!Word.TableCell#parentTable:member'
package: word!
fullName: parentTable
summary: Gets the parent table of the cell.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly parentTable: Word.Table;'
return:
type: '<xref uid="word!Word.Table:class" />'
- name: rowIndex
uid: 'word!Word.TableCell#rowIndex:member'
package: word!
fullName: rowIndex
summary: Gets the index of the cell's row in the table.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly rowIndex: number;'
return:
type: number
- name: shadingColor
uid: 'word!Word.TableCell#shadingColor:member'
package: word!
fullName: shadingColor
summary: 'Specifies the shading color of the cell. Color is specified in "\#RRGGBB" format or by using the color name.'
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'shadingColor: string;'
return:
type: string
- name: value
uid: 'word!Word.TableCell#value:member'
package: word!
fullName: value
summary: Specifies the text of the cell.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'value: string;'
return:
type: string
- name: verticalAlignment
uid: 'word!Word.TableCell#verticalAlignment:member'
package: word!
fullName: verticalAlignment
summary: 'Specifies the vertical alignment of the cell. The value can be ''Top'', ''Center'', or ''Bottom''.'
remarks: >-
\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml
// Gets content alignment details about the first cell of the first table in the document.
await Word.run(async (context) => {
const firstTable: Word.Table = context.document.body.tables.getFirst();
const firstTableRow: Word.TableRow = firstTable.rows.getFirst();
const firstCell: Word.TableCell = firstTableRow.cells.getFirst();
firstCell.load(["horizontalAlignment", "verticalAlignment"]);
await context.sync();
console.log(`Details about the alignment of the first table's first cell:`, `- Horizontal alignment of the cell's content: ${firstCell.horizontalAlignment}`, `- Vertical alignment of the cell's content: ${firstCell.verticalAlignment}`);
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom";'
return:
type: '<xref uid="word!Word.VerticalAlignment:enum" /> | "Mixed" | "Top" | "Center" | "Bottom"'
- name: width
uid: 'word!Word.TableCell#width:member'
package: word!
fullName: width
summary: Gets the width of the cell in points.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly width: number;'
return:
type: number
methods:
- name: deleteColumn()
uid: 'word!Word.TableCell#deleteColumn:member(1)'
package: word!
fullName: deleteColumn()
summary: Deletes the column containing this cell. This is applicable to uniform tables.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'deleteColumn(): void;'
return:
type: void
description: ''
- name: deleteRow()
uid: 'word!Word.TableCell#deleteRow:member(1)'
package: word!
fullName: deleteRow()
summary: Deletes the row containing this cell.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'deleteRow(): void;'
return:
type: void
description: ''
- name: getBorder(borderLocation)
uid: 'word!Word.TableCell#getBorder:member(1)'
package: word!
fullName: getBorder(borderLocation)
summary: Gets the border style for the specified border.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getBorder(borderLocation: Word.BorderLocation): Word.TableBorder;'
parameters:
- id: borderLocation
description: Required. The border location.
type: '<xref uid="word!Word.BorderLocation:enum" />'
return:
type: '<xref uid="word!Word.TableBorder:class" />'
description: ''
- name: getBorder(borderLocationString)
uid: 'word!Word.TableCell#getBorder:member(2)'
package: word!
fullName: getBorder(borderLocationString)
summary: Gets the border style for the specified border.
remarks: >-
\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml
// Gets border details about the first of the first table in the document.
await Word.run(async (context) => {
const firstTable: Word.Table = context.document.body.tables.getFirst();
const firstCell: Word.TableCell = firstTable.getCell(0, 0);
const borderLocation = "Left";
const border: Word.TableBorder = firstCell.getBorder(borderLocation);
border.load(["type", "color", "width"]);
await context.sync();
console.log(`Details about the ${borderLocation} border of the first table's first cell:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`);
});
```
isPreview: false
isDeprecated: false
syntax:
content: >-
getBorder(borderLocationString: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" |
"Inside" | "Outside" | "All"): Word.TableBorder;
parameters:
- id: borderLocationString
description: Required. The border location.
type: '"Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"'
return:
type: '<xref uid="word!Word.TableBorder:class" />'
description: ''
- name: getCellPadding(cellPaddingLocation)
uid: 'word!Word.TableCell#getCellPadding:member(1)'
package: word!
fullName: getCellPadding(cellPaddingLocation)
summary: Gets cell padding in points.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult<number>;'
parameters:
- id: cellPaddingLocation
description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.'
type: '<xref uid="word!Word.CellPaddingLocation:enum" />'
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" /><number>'
description: ''
- name: getCellPadding(cellPaddingLocationString)
uid: 'word!Word.TableCell#getCellPadding:member(2)'
package: word!
fullName: getCellPadding(cellPaddingLocationString)
summary: Gets cell padding in points.
remarks: >-
\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml
// Gets cell padding details about the first cell of the first table in the document.
await Word.run(async (context) => {
const firstTable: Word.Table = context.document.body.tables.getFirst();
const firstCell: Word.TableCell = firstTable.getCell(0, 0);
const cellPaddingLocation = "Left";
const cellPadding = firstCell.getCellPadding(cellPaddingLocation);
await context.sync();
console.log(
`Cell padding details about the ${cellPaddingLocation} border of the first table's first cell: ${cellPadding.value} points`
);
});
```
isPreview: false
isDeprecated: false
syntax:
content: >-
getCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right"):
OfficeExtension.ClientResult<number>;
parameters:
- id: cellPaddingLocationString
description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.'
type: '"Top" | "Left" | "Bottom" | "Right"'
return:
type: '<xref uid="office!OfficeExtension.ClientResult:class" /><number>'
description: ''
- name: getNext()
uid: 'word!Word.TableCell#getNext:member(1)'
package: word!
fullName: getNext()
summary: Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getNext(): Word.TableCell;'
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
- name: getNextOrNullObject()
uid: 'word!Word.TableCell#getNextOrNullObject:member(1)'
package: word!
fullName: getNextOrNullObject()
summary: >-
Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject`
property set to `true`<!-- -->. For further information, see [*OrNullObject methods and
properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties)<!--
-->.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getNextOrNullObject(): Word.TableCell;'
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
- name: 'insertColumns(insertLocation, columnCount, values)'
uid: 'word!Word.TableCell#insertColumns:member(1)'
package: word!
fullName: 'insertColumns(insertLocation, columnCount, values)'
summary: >-
Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to
uniform tables. The string values, if specified, are set in the newly inserted rows.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After",
columnCount: number, values?: string[][]): void;
parameters:
- id: insertLocation
description: Required. It must be 'Before' or 'After'.
type: >-
<xref uid="word!Word.InsertLocation.before:member" /> | <xref uid="word!Word.InsertLocation.after:member" />
| "Before" | "After"
- id: columnCount
description: Required. Number of columns to add.
type: number
- id: values
description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array.
type: 'string[][]'
return:
type: void
description: ''
- name: 'insertRows(insertLocation, rowCount, values)'
uid: 'word!Word.TableCell#insertRows:member(1)'
package: word!
fullName: 'insertRows(insertLocation, rowCount, values)'
summary: >-
Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set
in the newly inserted rows.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After",
rowCount: number, values?: string[][]): Word.TableRowCollection;
parameters:
- id: insertLocation
description: Required. It must be 'Before' or 'After'.
type: >-
<xref uid="word!Word.InsertLocation.before:member" /> | <xref uid="word!Word.InsertLocation.after:member" />
| "Before" | "After"
- id: rowCount
description: Required. Number of rows to add.
type: number
- id: values
description: Optional 2D array. Cells are filled if the corresponding strings are specified in the array.
type: 'string[][]'
return:
type: '<xref uid="word!Word.TableRowCollection:class" />'
description: ''
- name: load(options)
uid: 'word!Word.TableCell#load:member(1)'
package: word!
fullName: load(options)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell;'
parameters:
- id: options
description: Provides options for which properties of the object to load.
type: '<xref uid="word!Word.Interfaces.TableCellLoadOptions:interface" />'
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
- name: load(propertyNames)
uid: 'word!Word.TableCell#load:member(2)'
package: word!
fullName: load(propertyNames)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'load(propertyNames?: string | string[]): Word.TableCell;'
parameters:
- id: propertyNames
description: A comma-delimited string or an array of strings that specify the properties to load.
type: 'string | string[]'
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
- name: load(propertyNamesAndPaths)
uid: 'word!Word.TableCell#load:member(3)'
package: word!
fullName: load(propertyNamesAndPaths)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: |-
load(propertyNamesAndPaths?: {
select?: string;
expand?: string;
}): Word.TableCell;
parameters:
- id: propertyNamesAndPaths
description: >-
`propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and
`propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
type: |-
{
select?: string;
expand?: string;
}
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
- name: 'set(properties, options)'
uid: 'word!Word.TableCell#set:member(1)'
package: word!
fullName: 'set(properties, options)'
summary: >-
Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate
properties, or another API object of the same type.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void;'
parameters:
- id: properties
description: >-
A JavaScript object with properties that are structured isomorphically to the properties of the object on
which the method is called.
type: '<xref uid="word!Word.Interfaces.TableCellUpdateData:interface" />'
- id: options
description: Provides an option to suppress errors if the properties object tries to set any read-only properties.
type: '<xref uid="office!OfficeExtension.UpdateOptions:interface" />'
return:
type: void
description: ''
- name: set(properties)
uid: 'word!Word.TableCell#set:member(2)'
package: word!
fullName: set(properties)
summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'set(properties: Word.TableCell): void;'
parameters:
- id: properties
description: ''
type: '<xref uid="word!Word.TableCell:class" />'
return:
type: void
description: ''
- name: 'setCellPadding(cellPaddingLocation, cellPadding)'
uid: 'word!Word.TableCell#setCellPadding:member(1)'
package: word!
fullName: 'setCellPadding(cellPaddingLocation, cellPadding)'
summary: Sets cell padding in points.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void;'
parameters:
- id: cellPaddingLocation
description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.'
type: '<xref uid="word!Word.CellPaddingLocation:enum" />'
- id: cellPadding
description: Required. The cell padding.
type: number
return:
type: void
description: ''
- name: 'setCellPadding(cellPaddingLocationString, cellPadding)'
uid: 'word!Word.TableCell#setCellPadding:member(2)'
package: word!
fullName: 'setCellPadding(cellPaddingLocationString, cellPadding)'
summary: Sets cell padding in points.
remarks: '\[ [API set: WordApi 1.3](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'setCellPadding(cellPaddingLocationString: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void;'
parameters:
- id: cellPaddingLocationString
description: 'Required. The cell padding location must be ''Top'', ''Left'', ''Bottom'', or ''Right''.'
type: '"Top" | "Left" | "Bottom" | "Right"'
- id: cellPadding
description: Required. The cell padding.
type: number
return:
type: void
description: ''
- name: 'split(rowCount, columnCount)'
uid: 'word!Word.TableCell#split:member(1)'
package: word!
fullName: 'split(rowCount, columnCount)'
summary: Splits the cell into the specified number of rows and columns.
remarks: '\[ [API set: WordApi 1.4](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'split(rowCount: number, columnCount: number): void;'
parameters:
- id: rowCount
description: Required. The number of rows to split into. Must be a divisor of the number of underlying rows.
type: number
- id: columnCount
description: Required. The number of columns to split into.
type: number
return:
type: void
description: ''
- name: toJSON()
uid: 'word!Word.TableCell#toJSON:member(1)'
package: word!
fullName: toJSON()
summary: >-
Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to
`JSON.stringify()`<!-- -->. (`JSON.stringify`<!-- -->, in turn, calls the `toJSON` method of the object that is
passed to it.) Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain
JavaScript object (typed as `Word.Interfaces.TableCellData`<!-- -->) that contains shallow copies of any loaded
child properties from the original object.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'toJSON(): Word.Interfaces.TableCellData;'
return:
type: '<xref uid="word!Word.Interfaces.TableCellData:interface" />'
description: ''
- name: track()
uid: 'word!Word.TableCell#track:member(1)'
package: word!
fullName: track()
summary: >-
Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand
for
[context.trackedObjects.add(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member)<!--
-->. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and
get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the
object to the tracked object collection when the object was first created. If this object is part of a collection,
you should also track the parent collection.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'track(): Word.TableCell;'
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
- name: untrack()
uid: 'word!Word.TableCell#untrack:member(1)'
package: word!
fullName: untrack()
summary: >-
Release the memory associated with this object, if it has previously been tracked. This call is shorthand for
[context.trackedObjects.remove(thisObject)](https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member)<!--
-->. Having many tracked objects slows down the host application, so please remember to free any objects you add,
once you're done using them. You'll need to call `context.sync()` before the memory release takes effect.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'untrack(): Word.TableCell;'
return:
type: '<xref uid="word!Word.TableCell:class" />'
description: ''
extends: '<xref uid="office!OfficeExtension.ClientObject:class" />'