[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
Formatting information pertaining to text alignment in cells. There are a variety of choices for how text is aligned both horizontally and vertically, as well as indentation settings, and so on.
Parent Elements |
dxf (§3.8.14); ndxf (§3.11.1.4); odxf (§3.11.1.6); xf (§3.8.45) |
Attributes |
Description |
horizontal (Horizontal Alignment) |
Specifies the type of horizontal alignment in cells.
The possible values for this attribute are defined by the ST_HorizontalAlignment simple type (§3.18.42). |
indent (Indent) |
An integer value, where an increment of 1 represents 3 spaces. Indicates the number of spaces (of the normal style font) of indentation for text in a cell. The number of spaces to indent is calculated as following:
Number of spaces to indent = indent value * 3
[Example: For example, an indent value of '1' means that the text begins 3 space widths (of the normal style font) from the edge of the cell. end example]
[Note: The width of one space character is defined by the font. end note]
Only left, right, and distributed horizontal alignments are supported.
The possible values for this attribute are defined by the XML Schema unsignedInt datatype. |
justifyLastLine (Justify Last Line) |
A boolean value indicating if the cells justified or distributed alignment should be used on the last line of text. (This is typical for East Asian alignments but not typical in other contexts.)
The possible values for this attribute are defined by the XML Schema boolean datatype. |
readingOrder (Reading Order) |
An integer value indicating whether the reading order (bidirectionality) of the cell is left-to-right, right-to-left, or context dependent.
0 - Context Dependent 1 - Left-to-Right 2 - Right-to-Left
The possible values for this attribute are defined by the XML Schema unsignedInt datatype. |
relativeIndent (Relative Indent) |
An integer value (used only in a dxf element) to indicate the additional number of spaces of indentation to adjust for text in a cell.
The possible values for this attribute are defined by the XML Schema int datatype. |
shrinkToFit (Shrink To Fit) |
A boolean value indicating if the displayed text in the cell should be shrunk to fit the cell width. Not applicable when a cell contains multiple lines of text.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
textRotation (Text Rotation) |
Text rotation in cells. Expressed in degrees. Values range from 0 to 180. The first letter of the text is considered the center-point of the arc. For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the horizon is calculated as:
[degrees below horizon] = 90 - textRotation.
0
45
90
135
180
The possible values for this attribute are defined by the XML Schema unsignedInt datatype. |
vertical (Vertical Alignment) |
Vertical alignment in cells.
The possible values for this attribute are defined by the ST_VerticalAlignment simple type (§3.18.89). |
wrapText (Wrap Text) |
A boolean value indicating if the text in a cell should be line-wrapped within the cell.
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_CellAlignment">
<attribute name="horizontal" type="ST_HorizontalAlignment" use="optional"/>
<attribute name="vertical" type="ST_VerticalAlignment" use="optional"/>
<attribute name="textRotation" type="xsd:unsignedInt" use="optional"/>
<attribute name="wrapText" type="xsd:boolean" use="optional"/>
<attribute name="indent" type="xsd:unsignedInt" use="optional"/>
<attribute name="relativeIndent" type="xsd:int" use="optional"/>
<attribute name="justifyLastLine" type="xsd:boolean" use="optional"/>
<attribute name="shrinkToFit" type="xsd:boolean" use="optional"/>
<attribute name="readingOrder" type="xsd:unsignedInt" use="optional"/>
</complexType>