Cell D2 Formatting

Cell D2 contains the text "Q1" and is defined in the cell table of sheet1 as:

<c r="D2" s="7" t="s">
	<v>0</v>
</c>

On this cell, the attribute value s="7" indicates that the 7th (zero-based) <xf> definition of <cellXfs> holds the formatting information for the cell. The 7th <xf> of <cellXfs> is defined as:

<xf numFmtId="0" fontId="4" fillId="2" borderId="2" xfId="1" applyBorder="1"/>

The number formatting information cannot be found in a <numFmt> definition because it is a built-in format; instead, it is implicitly understood to be the 0th built-in number format. Remembering that the indexes to other element collections are also zero-based, the font information can be found in the 4th <font> definition; the fill information in the 2nd <fill> definition; and the border information in the 2nd <border> definition. The cell uses a cell style which is defined in the 1st <cellStyleXf> definition and, finally, borders specified in this master formatting record should be applied.

Remember that these collections are zero-based.

Additionally the <fill> definition for D2 references a themed color, whose index is 4th in the <clrScheme> definition of the theme part:

	<fill>
	<patternFill patternType="solid">
	<fgColor theme="4"/>
	<bgColor theme="4"/>
	</patternFill>
	</fill>

Graphically, the index references can be shown like this: