<xf> (Format)

A single xf element describes all of the formatting for a cell.

Parent Elements

<cellStyleXfs>3.8.9); <cellXfs>3.8.10)

Child Elements

Subclause

<alignment> (Alignment)

§3.8.1

<extLst> (Future Feature Data Storage Area)

§3.2.10

<protection> (Protection Properties)

§3.8.33

Attributes

Description

<applyAlignment> (Apply Alignment)

A boolean value indicating whether the alignment formatting specified for this <xf >should be applied.

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

<applyBorder> (Apply Border)

A boolean value indicating whether the border formatting specified for this <xf> should be applied.

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

<applyFill> (Apply Fill)

A boolean value indicating whether the fill formatting specified for this <xf >should be applied.

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

<applyFont> (Apply Font)

A boolean value indicating whether the font formatting specified for this <xf >should be applied.

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

<applyNumberFormat> (Apply Number Format)

A boolean value indicating whether the number formatting specified for this <xf >should be applied.

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

<applyProtection> (Apply Protection)

A boolean value indicating whether the protection formatting specified for this <xf >should be applied.

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

<borderId> (Border Id)

Zero-based index of the <border> record used by this cell format.

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

<fillId> (Fill Id)

Zero-based index of the <fill> record used by this cell format.

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

<fontId> (Font Id)

Zero-based index of the <font> record used by this cell format.

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

<numFmtId> (Number Format Id)

Id of the number format (<numFmt>) record used by this cell format.

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

<pivotButton> (Pivot Button)

A boolean value indicating whether the cell rendering includes a pivot table dropdown button.

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

<quotePrefix> (Quote Prefix)

A boolean value indicating whether the text string in a cell should be prefixed by a single quote mark (e.g., 'text). In these cases, the quote is not stored in the Shared Strings Part.

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

<xfId> (Format Id)

For <xf> records contained in <cellXfs> this is the zero-based index of an <xf> record contained in <cellStyleXfs> corresponding to the cell style applied to the cell.

Not present for <xf> records contained in <cellStyleXfs>.

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

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Xf">
	<sequence>
	<element name="alignment" type="CT_CellAlignment" minOccurs="0" maxOccurs="1"/>
	<element name="protection" type="CT_CellProtection" minOccurs="0" maxOccurs="1"/>
	<element name="extLst" type="CT_ExtensionList" minOccurs="0" maxOccurs="1"/>
	</sequence>
	<attribute name="numFmtId" type="ST_NumFmtId" use="optional"/>
	<attribute name="fontId" type="ST_FontId" use="optional"/>
	<attribute name="fillId" type="ST_FillId" use="optional"/>
	<attribute name="borderId" type="ST_BorderId" use="optional"/>
	<attribute name="xfId" type="ST_CellStyleXfId" use="optional"/>
	<attribute name="quotePrefix" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="pivotButton" type="xsd:boolean" use="optional" default="false"/>
	<attribute name="applyNumberFormat" type="xsd:boolean" use="optional"/>
	<attribute name="applyFont" type="xsd:boolean" use="optional"/>
	<attribute name="applyFill" type="xsd:boolean" use="optional"/>
	<attribute name="applyBorder" type="xsd:boolean" use="optional"/>
	<attribute name="applyAlignment" type="xsd:boolean" use="optional"/>
	<attribute name="applyProtection" type="xsd:boolean" use="optional"/>
</complexType>