L.2.7.4.4 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) definition of holds the formatting information for the cell. The 7th of 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 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 definition; the fill information in the 2nd definition; and the border information in the 2nd definition. The cell uses a cell style which is defined in the 1st definition and, finally, borders specified in this master formatting record should be applied.

Remember that these collections are zero-based.

Additionally the definition for D2 references a themed color, whose index is 4th in the 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:

Last updated on