# Alignment element

Specifies the font alignment attributes to use for cells to which the defined style is applied.

## Usage

    <Alignment
    	Horizontal="xsd:string"
    	ReadingOrder="xsd:string"
    	Indent="xsd:unsignedLong"
    	Rotate="xsd:double"
    	ShrinkToFit="TrueFalseType"
    	Vertical="xsd:string"
    	VerticalText="TrueFalseType"
    	WrapText="TrueFalseType"
    />

## Element Information

Element type | AlignmentType
Namespace | urn:schemas-microsoft-com:office:spreadsheet
Schema name | XML Spreadsheet 2002

## Elements and Attributes

### Parent Elements

Element | Description
--- | ---
Style | Defines a single style in the current workbook. This element is required for custom formatting; otherwise, it is optional.

### Child Elements

None.

### Attributes

Attribute | Type | Required | Description | Possible Values
--- | --- | --- | --- | ---
Horizontal | Anonymous | optional | Specifies the left-to-right alignment of text within a cell. | CenterAcrossSelection Fill Left Right Justify Distributed Center Automatic JustifyDistributed
ReadingOrder | Anonymous | optional | Specifies the default right-to-left text entry mode for a cell. | RightToLeft LeftToRight Context
Indent | xsd:unsignedLong | optional | Specifies the number of indents. This attribute is not supported by the Spreadsheet component. | See external namespace.
Rotate | Anonymous | optional | Specifies the rotation of text within a cell. | minInclusive = -90 maxInclusive = 90
ShrinkToFit | TrueFalseType | optional | Specifies whether text size should be shrunk so that all of the text fits within a cell. | 0 1
Vertical | Anonymous | optional | Specifies the top-to-bottom alignment of text within a cell. | Automatic Top Bottom Center Justify Distributed JustifyDistributed
VerticalText | TrueFalseType | optional | Specifies whether text characters are positioned to read vertically. | 0 1
WrapText | TrueFalseType | optional | Specifies whether the text in a cell should wrap at the cell boundary. | 0 1

## Definition

    <xsd:element name="Alignment" type="AlignmentType" minOccurs="0" >
    </xsd:element>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp