21.1.3.16 tc
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
<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” is the only text in the cell. end example]
Attributes
hMerge (Horizontal Merge)
When this attribute is set to 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">
…
</a:tc>
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 W3C XML Schema boolean datatype.
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">
…
/a:tc>
<a:tc hMerge="1">
…
/a:tc>
<a:tc hMerge="1">
…
/a:tc>
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 W3C XML Schema int 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">
…
/a:tc>
<a:tc vMerge="1">
…
/a:tc>
<a:tc vMerge="1">
…
/a:tc>
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 W3C XML Schema int datatype.
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:
<a:tc id="januarytwentynine">
…
</a:tc>
The value in the id specifies a unique identifer oif januarytwentynine. 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 W3C XML Schema string datatype.
vMerge (Vertical Merge)
When this attribute is set to 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">
…
/a:tc>
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 W3C XML Schema boolean datatype.
[Note: The W3C XML Schema definition of this element’s content model (CT_TableCell) is located in A.4.1. end note]