Partager via


TableCellProperties Class

Table Cell Properties.When the object is serialized out as xml, its qualified name is a:tcPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.TableCellProperties

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(BottomLeftToTopRightBorderLineProperties))> _
<ChildElementInfoAttribute(GetType(LeftBorderLineProperties))> _
<ChildElementInfoAttribute(GetType(RightBorderLineProperties))> _
<ChildElementInfoAttribute(GetType(TopBorderLineProperties))> _
<ChildElementInfoAttribute(GetType(BottomBorderLineProperties))> _
<ChildElementInfoAttribute(GetType(TopLeftToBottomRightBorderLineProperties))> _
<ChildElementInfoAttribute(GetType(SolidFill))> _
<ChildElementInfoAttribute(GetType(Cell3DProperties))> _
<ChildElementInfoAttribute(GetType(NoFill))> _
<ChildElementInfoAttribute(GetType(BlipFill))> _
<ChildElementInfoAttribute(GetType(GroupFill))> _
<ChildElementInfoAttribute(GetType(GradientFill))> _
<ChildElementInfoAttribute(GetType(PatternFill))> _
Public Class TableCellProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableCellProperties
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(BottomLeftToTopRightBorderLineProperties))]
[ChildElementInfoAttribute(typeof(LeftBorderLineProperties))]
[ChildElementInfoAttribute(typeof(RightBorderLineProperties))]
[ChildElementInfoAttribute(typeof(TopBorderLineProperties))]
[ChildElementInfoAttribute(typeof(BottomBorderLineProperties))]
[ChildElementInfoAttribute(typeof(TopLeftToBottomRightBorderLineProperties))]
[ChildElementInfoAttribute(typeof(SolidFill))]
[ChildElementInfoAttribute(typeof(Cell3DProperties))]
[ChildElementInfoAttribute(typeof(NoFill))]
[ChildElementInfoAttribute(typeof(BlipFill))]
[ChildElementInfoAttribute(typeof(GroupFill))]
[ChildElementInfoAttribute(typeof(GradientFill))]
[ChildElementInfoAttribute(typeof(PatternFill))]
public class TableCellProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • LeftBorderLineProperties <a:lnL>

  • RightBorderLineProperties <a:lnR>

  • TopBorderLineProperties <a:lnT>

  • BottomBorderLineProperties <a:lnB>

  • TopLeftToBottomRightBorderLineProperties <a:lnTlToBr>

  • BottomLeftToTopRightBorderLineProperties <a:lnBlToTr>

  • Cell3DProperties <a:cell3D>

  • NoFill <a:noFill>

  • SolidFill <a:solidFill>

  • GradientFill <a:gradFill>

  • BlipFill <a:blipFill>

  • PatternFill <a:pattFill>

  • GroupFill <a:grpFill>

  • ExtensionList <a:extLst>

[ISO/IEC 29500-1 1st Edition]

21.1.3.17 tcPr (Table Cell Properties)

This element defines the formatting properties associated with a cell. The formatting options which are available to be adjusted range from the line types used for the borders to the cell fill to the margins associated with the layout of the text in the cell.

[Example: Consider the following example of a tcPr within DrawingML:

<a:tcPr marL="45720" marR="45720">
<a:lnL w="38100" cap="flat" cmpd="sng" algn="ctr">
<a:solidFill>
<a:schemeClr val="accent2"/>
</a:solidFill>
<a:prstDash val="solid"/>
<a:round/>
<a:headEnd type="none" w="med" len="med"/>
<a:tailEnd type="none" w="med" len="med"/>
</a:lnL>
</a:tcPr>

In this example, we have a solid line defined as the left border of the cell along with left and right margin adjustments being made from the default margins. end example]

Parent Elements

tc (§21.1.3.16)

Child Elements

Subclause

blipFill (Picture Fill)

§20.1.8.14

cell3D (Cell 3-D)

§21.1.3.1

extLst (Extension List)

§20.1.2.2.15

gradFill (Gradient Fill)

§20.1.8.33

grpFill (Group Fill)

§20.1.8.35

headers (Header Cells Associated With Table Cell)

§21.1.3.4

lnB (Bottom Border Line Properties)

§21.1.3.5

lnBlToTr (Bottom-Left to Top-Right Border Line Properties)

§21.1.3.6

lnL (Left Border Line Properties)

§21.1.3.7

lnR (Right Border Line Properties)

§21.1.3.8

lnT (Top Border Line Properties)

§21.1.3.9

lnTlToBr (Top-Left to Bottom-Right Border Line Properties)

§21.1.3.10

noFill (No Fill)

§20.1.8.44

pattFill (Pattern Fill)

§20.1.8.47

solidFill (Solid Fill)

§20.1.8.54

Attributes

Description

anchor (Anchor)

Defines the alignment of the text vertically within the cell.

[Example: Consider the following example:

<a:tcPr marL="45720" anchor="ctr"/>

In this example, the text in the cell is anchored to the center of the cell vertically. end example]

The possible values for this attribute are defined by the ST_TextAnchoringType simple type (§20.1.10.60).

anchorCtr (Anchor Center)

When this attribute is 1 or true , it modifies the anchor attribute. This attribute center-aligns the text box itself which allows for text to be left aligned along the center of the cell for example.

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

horzOverflow (Horizontal Overflow)

Specifies the clipping behavior of the cell. The two options here allow for the text to be clipped and out of view when outside of the bounds of the cell, or for the text to remain visible and overflow outside of the cell.

[Example: Consider the following example:

<a:tcPr horzOverflow="overflow">
…
</a:tcPr>

In this example, the text in the cell freely overflows outside of the cell boundaries and always remains visible. end example]

The possible values for this attribute are defined by the ST_TextHorzOverflowType simple type (§20.1.10.69).

marB (Bottom Margin)

Specifies the bottom margin of the cell. The value specified in this attribute is the distance to offset from the bottom of the cell.

[Example: Consider the following example:

<a:tcPr marB="45720" anchor="ctr">
…
</a:tcPr>

In this example, we have specified a value for the margin on the bottom of the cell. end example]

The possible values for this attribute are defined by the ST_Coordinate32 simple type (§20.1.10.17).

marL (Left Margin)

This attribute specifies the left margin of the cell. The value specified in this attribute is the distance to offset from the left of the cell in EMU's.

[Example: Consider the following example:

<a:tcPr marL="45720" anchor="ctr">
…
</a:tcPr>

In this example, we have specified a value for the margin on the left of the cell. end example]

The possible values for this attribute are defined by the ST_Coordinate32 simple type (§20.1.10.17).

marR (Right Margin)

This attribute specifies the right margin of the cell. The value specified in this attribute is the distance to offset from the right of the cell in EMU's.

[Example: Consider the following example:

<a:tcPr marR="45720" anchor="ctr">
…
</a:tcPr>

In this example, we have specified a value for the margin on the right of the cell. end example]

The possible values for this attribute are defined by the ST_Coordinate32 simple type (§20.1.10.17).

marT (Top Margin)

This attribute specifies the top margin of the cell. The value specified in this attribute is the distance to offset from the top of the cell in EMU's.

[Example: Consider the following example:

<a:tcPr marT="45720" anchor="ctr">
…
</a:tcPr>

In this example, we have specified a value for the margin on the top of the cell. end example]

The possible values for this attribute are defined by the ST_Coordinate32 simple type (§20.1.10.17).

vert (Text Direction)

Defines the text direction within the cell.

[Example: Consider the following example:

<a:tcPr vert="vert270">
…
</a:tcPr>

In this example, we have rotated the layout of the text 270 degrees so that it starts at the bottom of the cell and goes upward toward the top of the cell. end example]

The possible values for this attribute are defined by the ST_TextVerticalType simple type (§20.1.10.83).

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

© ISO/IEC29500: 2008.

Thread Safety

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

See Also

Reference

TableCellProperties Members

DocumentFormat.OpenXml.Drawing Namespace