[Table of Contents] [docx version]
Error! No text of specified style in document.
This element defines a cell within the table. The table cell holds a text body that actually contains the data held within the cell along with the properties of the table cell which hold formatting options associated with the cell.
[Example: Consider the following example of a tc within DrawingML:
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:pPr marL="0" algn="ctr" rtl="0"/>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>data</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
In this example, we see a single cell in a table being defined with the default cell properties and a text body which contains the word "data". The text "data" will be the only text in the cell. end example]
Parent Elements |
tr (§5.1.6.16) |
Child Elements |
Subclause |
extLst (Extension List) |
§5.1.2.1.15 |
tcPr (Table Cell Properties) |
§5.1.6.15 |
txBody (Shape Text Body) |
§5.1.2.1.40 |
Attributes |
Description |
gridSpan (Grid Span) |
Specifies the number of columns that a merged cell spans. This is used in combination with the hMerge attribute on other cells in order to specify the beginning cell of a horizontal merge.
[Example: Consider the following example:
<a:tc gridSpan="3">
In this example, we can define what looks like a single cell in the table as a group of three cells merged together. The merged cell spans three columns of the table. end example]
The possible values for this attribute are defined by the XML Schema int datatype. |
hMerge (Horizontal Merge) |
When this attribute is set to on, 1 or true, then this table cell is to be merged with the previous horizontal table cell when the table is created.
[Example: Consider the following example:
<a:tc hMerge="1">
In this example, we see the hMerge attribute set to on which signifies that this cell is to be merged with the previous horizontal cell in the table. end example]
The possible values for this attribute are defined by the XML Schema boolean datatype. |
rowSpan (Row Span) |
Specifies the number of rows that a merged cell spans. This is used in combination with the vMerge attribute on other cells in order to specify the beginning cell of a horizontal merge.
[Example: Consider the following example:
<a:tc rowSpan="3">
In this example, we can define what looks like a single cell in the table as a group of three cells merged together. The merged cell spans three rows of the table. end example]
The possible values for this attribute are defined by the XML Schema int datatype. |
vMerge (Vertical Merge) |
When this attribute is set to on, 1 or true, then this table cell is to be merged with the previous vertical table cell when the table is created.
[Example: Consider the following example:
<a:tc vMerge="1">
In this example, we see the vMerge attribute set to on which signifies that this cell is to be merged with the previous vertical cell in the table. end example]
The possible values for this attribute are defined by the XML Schema boolean datatype. |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_TableCell">
<sequence>
<element name="txBody" type="CT_TextBody" minOccurs="0" maxOccurs="1"/>
<element name="tcPr" type="CT_TableCellProperties" minOccurs="0" maxOccurs="1"/>
<element name="extLst" type="CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="rowSpan" type="xsd:int" use="optional" default="1"/>
<attribute name="gridSpan" type="xsd:int" use="optional" default="1"/>
<attribute name="hMerge" type="xsd:boolean" use="optional" default="false"/>
<attribute name="vMerge" type="xsd:boolean" use="optional" default="false"/>
</complexType>