2.4.862 BrtXF

The BrtXF record specifies the formatting for cells. This record can specify a cell XF (section 2.2.6.1.1) or a cell style XF (section 2.2.6.1.2.1). The total number of BrtXF records in the workbook which are not built-in MUST NOT exceed 0xFF96. A BrtXF record is considered to be built-in if it is referenced by a built-in BrtStyle (section 2.4.798) record. A BrtStyle record is considered to be built-in if the fBuiltIn member of grbitObj1 equals 1.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

ixfeParent

iFmt

iFont

iFill

ixBorder

trot

indent

alc

alcv

A

B

C

D

E

F

G

H

I

xfGrbitAtr

unused

ixfeParent (2 bytes):  An unsigned integer that specifies whether this record is a cell style XF or a cell XF. If this record specifies a cell style XF, the value MUST be 0xFFFF. If the record specifies a cell XF, the value is a zero-based index to another BrtXF record in the collection of all records directly following BrtBeginCellStyleXFs (section 2.4.20) which is a cell style XF.

iFmt (2 bytes):  An Ifmt (section 2.5.77) that specifies the number format used when displaying the value of the cell.

iFont (2 bytes): An unsigned integer that specifies a zero-based index of a BrtFont (section 2.4.683) record in the collection of records directly following a BrtBeginFonts (section 2.4.89) record. The referenced BrtFont specifies the font properties for the cell.

iFill (2 bytes):  An unsigned integer that specifies a zero-based index of a BrtFill (section 2.4.674) record in the collection of records directly following a BrtBeginFills (section 2.4.83) record. The referenced BrtFill specifies the fill properties for the cell.

ixBorder (2 bytes):  An unsigned integer that specifies a zero-based index of a BrtBorder (section 2.4.311) record in the collection of records directly following a BrtBeginBorders (section 2.4.12) record. The referenced BrtBorder specifies the border properties for the cell.

trot (1 byte): An unsigned integer that specifies the text rotation in cells. This field represents an angle that is specified in degrees. The first letter of the text is considered the center-point of the arc. This field MUST be one of the values specified in the following table.

Value

Meaning

0-90

Text rotated counterclockwise 0 to 90 degrees

91-180

Text rotated clockwise 1 to 90 degrees

254

Text rotation is context dependent

255

Vertical text

indent (1 byte): An unsigned integer that specifies the indentation level for text in a cell. The indent value with respect to the number of space characters is calculated according to the following formula:

 indent = number of space characters / 3

indent MUST be greater than or equal to 0 and less than or equal to 250.

alc (3 bits): An unsigned integer that specifies the type of horizontal alignment for text in the cell. The possible values for this attribute are defined in the following table.

Value

Meaning

0

General alignment

1

Left alignment

2

Center alignment

3

Right alignment

4

Fill alignment

5

Justify alignment

6

Center-across-selection alignment

7

Distributed alignment

alcv (3 bits): An unsigned integer that specifies the type of vertical alignment for text in the cell. The possible values for this attribute are defined in the following table.

Value

Meaning

0

Top alignment

1

Center alignment

2

Bottom alignment

3

Justify alignment

4

Distributed alignment

A - fWrap (1 bit): A bit that specifies whether the text in a cell is line-wrapped within the cell.

B - fJustLast (1 bit): A bit that specifies whether the justified or distributed alignment of the cell is used on the last line of text. (Setting the value of this field to 1 is typical for East Asian text but not typical in other contexts.)

C - fShrinkToFit (1 bit): A bit that specifies whether the displayed text in the cell is shrink to fit.

D - fMergeCell (1 bit): A bit that specifies whether this cell is part of a merged cell.

E - iReadingOrder (2 bits): An unsigned integer that specifies the reading order of the cell. The possible values for this attribute are defined in the following table.

Value

Meaning

0

Context dependent

1

Left-to-right

2

Right-to-left

F - fLocked (1 bit): A bit that specifies whether the locked protection property is set to true.

G - fHidden (1 bit): A bit that specifies whether the hidden protection property is set to true.

H - fSxButton (1 bit): A bit that specifies whether the cell has a PivotTable (section 2.1.7.40) dropdown button.

I - f123Prefix (1 bit): A bit that specifies whether the text string in a cell is prefixed by a single quote mark.

xfGrbitAtr (6 bits): An unsigned integer that specifies how to interpret the formatting properties defined in other fields. Each bit represents one set of related formatting properties. The meaning of the values of the bits varies based on whether this record specifies a cell XF or a cell style XF according to the following table.

Bit

Context

Value

Meaning

0

Cell Style XF

0

Number formatting, as specified in the iFmt field, is included in this cell style (section 2.2.6.1.2).

0

Cell Style XF

1

Number formatting, as specified in the iFmt field, MUST be ignored.

0

Cell XF

0

If the number format of the cell style XF record referenced by ixfeParent changes, that number format is set in this XF as well.

0

Cell XF

1

If the number format of the cell style XF record referenced by ixfeParent changes, the number format in this XF MUST NOT be changed.

1

Cell Style XF

0

Font formatting, as specified in the iFont field, is included in this cell style (section 2.2.6.1.2).

1

Cell Style XF

1

Font formatting, as specified in the iFont field, MUST be ignored.

1

Cell XF

0

If the font formatting of the cell style XF record referenced by ixfeParent changes, that font formatting is set in this XF as well.

1

Cell XF

1

If the font formatting of the cell style XF record referenced by ixfeParent changes, the font formatting in this XF MUST NOT be changed.

2

Cell Style XF

0

Alignment properties, as specified in the trot, indent, alc, alcv, fWrap, fJustLast, fShrinkToFit, fMergeCell, and iReadingOrder fields, are included in this cell style.

2

Cell Style XF

1

Alignment properties, as specified in the trot, indent, alc, alcv, fWrap, fJustLast, fShrinkToFit, fMergeCell, and iReadingOrder fields, MUST be ignored.

2

Cell XF

0

If the alignment properties of the cell style XF record referenced by ixfeParent change, those alignment properties are set in this XF as well.

2

Cell XF

1

If the alignment properties of the cell style XF record referenced by ixfeParent change, the alignment properties in this XF MUST NOT be changed.

3

Cell Style XF

0

Border formatting, as specified in the ixBorder field, is included in this cell style.

3

Cell Style XF

1

Border formatting, as specified in the ixBorder field, MUST be ignored.

3

Cell XF

0

If the border formatting of the cell style XF record referenced by ixfeParent changes, that border formatting is set is this XF as well.

3

Cell XF

1

If the border formatting of the cell style XF record referenced by ixfeParent changes, the border formatting in this XF MUST NOT be changed.

4

Cell Style XF

0

Fill formatting, as specified in the iFill field, is included in this cell style.

4

Cell Style XF

1

Fill formatting, as specified in the iFill field, MUST be ignored.

4

Cell XF

0

If the fill formatting of the cell style XF record referenced by ixfeParent changes, that fill formatting is set in this XF as well.

4

Cell XF

1

If the fill formatting of the cell style XF record referenced by ixfeParent changes, the fill formatting in this XF MUST NOT be changed.

5

Cell Style XF

0

Protection properties, as specified in the fLocked and fHidden fields, are included in this cell style.

5

Cell Style XF

1

Protection properties, as specified in the fLocked and fHidden fields, MUST be ignored.

5

Cell XF

0

If the protection properties of the cell style XF record referenced by ixfeParent change, those protection properties are set in this XF as well.

5

Cell XF

1

If the protection properties of the cell style XF record referenced by ixfeParent change, the protection properties in this XF MUST NOT be changed.

unused (10 bits): Undefined and MUST be ignored.