2.2.6 Styles

The styles (section 2.1.7.50) part contains formatting and protection information. This information is used to describe the cell formatting in a sheet.

Cell formatting is composed of several sets of properties:

  • Font properties such as bold, italic, font color, and font size.

  • Fill properties such as foreground and background colors, pattern, and gradient.

  • Alignment properties such as left, center, and right alignment.

  • Border properties such as left, right, top, bottom, thick or thin, and color.

  • Number formatting properties (date, time, number of decimal places, etc…)

  • Protection properties such as locked and hidden.

These properties, as a whole, describe how a particular cell is displayed and printed.

There are two types of objects in the styles part that contain formatting properties. They are XFs (section 2.2.6.1) and DXFs (section 2.2.6.2). In general, XFs describe the formatting directly associated with a cell, and DXFs describe additional formatting properties that can be applied to one or more cells.