Description
Represents a table cell in a table in the Word document.
C#
vb.net
Remarks
New table cells are created when you create a new Table. They cannot be created independent of a Table using the new
keyword.
To retrieve and manipulate a table cell, use array index notation on a Table
object. You can also use Element.GetElements(Element.Type.TableCell) to get all elements, of which you can check which ones are of type TableCell.
The following sample demonstrates getting a reference to a table cell at column 3 (4th column), row 2 (3rd row).
Examples
C#
vb.net
Properties
Name |
Description |
---|---|
Sets or returns a TableCell.WidthUnits object that represents the cell width units for this cell. | |
Returns or sets a boolean that represents if this is the first cell in a group of horizontally merged cells. The first cell will contain all the content. |
|
Sets or returns whether the current cell is the first cell in a group of vertically merged cells. The first cell will contain all the content. | |
Sets or returns whether this cell has been merged with a preceding horizontal cell. | |
Returns or sets a boolean that represents if Word will prevent text from wrapping in this table cell. |
|
Returns or sets an int that represents the preferred width of this cell. In order to set this property, the CellWidthUnits property must first be set. The width is returned in twips. One twip = (1/20 pt) or (1/1440 in). |
|
Returns an Shading object which on which you can manipulate the shading (fill color and/or pattern) properties for this cell. | |
Returns or sets a TableCell.VerticalAlignment object that represents the vertical alignment of the text in this cell. | |
Returns or sets a boolean that represents if this cell is merged with one or more cells vertically. The first cell will contain all the content. |
Methods
Name |
Description |
---|---|
Applies Font properties to all text in this TableCell. The font properties will not be applied to text inside nested tables. | |
Applies ParagraphFormatting to all paragraphs in this TableCell. The ParagraphFormatting will not be applied to paragraphs inside nested tables. | |
Returns a Border object that lets you manipulate the border this table cell at a particular location. | |
Returns an int that represents this table cell margin at a particular location in twips. One twip = (1/20 pt) or (1/1440 in) |
|
Sets an int that represents this table cell margin at a particular location in twips. One twip = (1/20 pt) or (1/1440 in) |
Nested Classes
Name |
Description |
---|---|
Locations within a table cell for which padding values can be set. | |
Vertical alignments for a table cell. | |
Units used for setting a table cell width. |