TableCell Class

Table Cell.When the object is serialized out as xml, its qualified name is w:tc.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

[ChildElementInfoAttribute(typeof(RunConflictInsertion), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictInsertionRangeStart), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictInsertionRangeEnd), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictDeletionRangeStart), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(CustomXmlConflictDeletionRangeEnd), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ContentPart), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(RunConflictDeletion), FileFormatVersions.Office2010)]
public class TableCell : OpenXmlCompositeElement

The following table lists the possible child types:

  • TableCellProperties <w:tcPr>

  • AltChunk <w:altChunk>

  • CustomXmlBlock <w:customXml>

  • SdtBlock <w:sdt>

  • Paragraph <w:p>

  • Table <w:tbl>

  • ProofError <w:proofErr>

  • PermStart <w:permStart>

  • PermEnd <w:permEnd>

  • BookmarkStart <w:bookmarkStart>

  • BookmarkEnd <w:bookmarkEnd>

  • CommentRangeStart <w:commentRangeStart>

  • CommentRangeEnd <w:commentRangeEnd>

  • MoveFromRangeStart <w:moveFromRangeStart>

  • MoveFromRangeEnd <w:moveFromRangeEnd>

  • MoveToRangeStart <w:moveToRangeStart>

  • MoveToRangeEnd <w:moveToRangeEnd>

  • CustomXmlInsRangeStart <w:customXmlInsRangeStart>

  • CustomXmlInsRangeEnd <w:customXmlInsRangeEnd>

  • CustomXmlDelRangeStart <w:customXmlDelRangeStart>

  • CustomXmlDelRangeEnd <w:customXmlDelRangeEnd>

  • CustomXmlMoveFromRangeStart <w:customXmlMoveFromRangeStart>

  • CustomXmlMoveFromRangeEnd <w:customXmlMoveFromRangeEnd>

  • CustomXmlMoveToRangeStart <w:customXmlMoveToRangeStart>

  • CustomXmlMoveToRangeEnd <w:customXmlMoveToRangeEnd>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictInsertionRangeStart <w14:customXmlConflictInsRangeStart>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictInsertionRangeEnd <w14:customXmlConflictInsRangeEnd>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictDeletionRangeStart <w14:customXmlConflictDelRangeStart>

  • DocumentFormat.OpenXml.Office2010.Word.CustomXmlConflictDeletionRangeEnd <w14:customXmlConflictDelRangeEnd>

  • InsertedRun <w:ins>

  • DeletedRun <w:del>

  • MoveFromRun <w:moveFrom>

  • MoveToRun <w:moveTo>

  • ContentPart <w:contentPart>

  • DocumentFormat.OpenXml.Office2010.Word.RunConflictInsertion <w14:conflictIns>

  • DocumentFormat.OpenXml.Office2010.Word.RunConflictDeletion <w14:conflictDel>

[ISO/IEC 29500-1 1st Edition]

17.4.66 tc (Table Cell)

This element specifies a single cell in a table row, which contains the table’s content. Table cells in WordprocessingML are analogous to HTML td elements.

A tc element has one formatting child element, tcPr (§17.4.70), which defines the properties for the cell. Each unique property on the table cell is specified by a child element of this element. As well, a table cell can contain any block-level content, which allows for the nesting of paragraphs and tables within table cells.

If a table cell does not include at least one block-level element, then this document shall be considered corrupt.

[Example: Consider a table consisting of a single table cell, which contains the text Hello World:

Hello World

This table cell's content is represented by the following WordprocessingML:

<w:tcW w:w="0" w:type="auto"/>
<w:t>Hello, World</w:t>

The tc element contains a set of cell-level properties defined using the tcPr element, and a single block-level element - in this case, a paragraph. end example]

Parent Elements

customXml (§; sdtContent (§; tr (§17.4.79)

Child Elements


altChunk (Anchor for Imported External Content)


bookmarkEnd (Bookmark End)


bookmarkStart (Bookmark Start)


commentRangeEnd (Comment Anchor Range End)


commentRangeStart (Comment Anchor Range Start)


customXml (Block-Level Custom XML Element)


customXmlDelRangeEnd (Custom XML Markup Deletion End)


customXmlDelRangeStart (Custom XML Markup Deletion Start)


customXmlInsRangeEnd (Custom XML Markup Insertion End)


customXmlInsRangeStart (Custom XML Markup Insertion Start)


customXmlMoveFromRangeEnd (Custom XML Markup Move Source End)


customXmlMoveFromRangeStart (Custom XML Markup Move Source Start)


customXmlMoveToRangeEnd (Custom XML Markup Move Destination Location End)


customXmlMoveToRangeStart (Custom XML Markup Move Destination Location Start)


del (Deleted Run Content)


ins (Inserted Run Content)


moveFrom (Move Source Run Content)


moveFromRangeEnd (Move Source Location Container - End)


moveFromRangeStart (Move Source Location Container - Start)


moveTo (Move Destination Run Content)


moveToRangeEnd (Move Destination Location Container - End)


moveToRangeStart (Move Destination Location Container - Start)


oMath (Office Math)


oMathPara (Office Math Paragraph)


p (Paragraph)


permEnd (Range Permission End)


permStart (Range Permission Start)


proofErr (Proofing Error Anchor)


sdt (Block-Level Structured Document Tag)


tbl (Table)


tcPr (Table Cell Properties)




id (Table Cell Identifier)

Specifies a unique identifier for the current table cell. This identifier shall be unique within the table, and is used to identify this table cell as a header cell for other cells within the table, using the headers child element.

If this element is omitted, this table cell has no unique identifier.

[Example: Consider a table cell defined as follows:

<w:tc w:id="januaryeight">

The value in the id specifies a unique identifer of januaryeight. Other cells in the table are then able to reference this cell as a row or column header by referencing this ID. end example]

The possible values for this attribute are defined by the ST_String simple type (§

[Note: The W3C XML Schema definition of this element’s content model (CT_Tc) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions