Properties

$isStyleXf

$isStyleXf : boolean

Style XF or a cell XF ?

Type

boolean

$fontIndex

$fontIndex : integer

Index to the FONT record. Index 4 does not exist.

Type

integer

$numberFormatIndex

$numberFormatIndex : integer

An index (2 bytes) to a FORMAT record (number format).

Type

integer

$textJustLast

$textJustLast : integer

1 bit, apparently not used.

Type

integer

$foregroundColor

$foregroundColor : integer

The cell's foreground color.

Type

integer

$backgroundColor

$backgroundColor : integer

The cell's background color.

Type

integer

$bottomBorderColor

$bottomBorderColor : integer

Color of the bottom border of the cell.

Type

integer

$topBorderColor

$topBorderColor : integer

Color of the top border of the cell.

Type

integer

$leftBorderColor

$leftBorderColor : integer

Color of the left border of the cell.

Type

integer

$rightBorderColor

$rightBorderColor : integer

Color of the right border of the cell.

Type

integer

$mapBorderStyles

$mapBorderStyles : array

Map of BIFF2-BIFF8 codes for border styles.

Type

array — of int

$mapFillTypes

$mapFillTypes : array

Map of BIFF2-BIFF8 codes for fill types.

Type

array — of int

$mapHAlignments

$mapHAlignments : array

Map of BIFF2-BIFF8 codes for horizontal alignment.

Type

array — of int

$mapVAlignments

$mapVAlignments : array

Map of BIFF2-BIFF8 codes for vertical alignment.

Type

array — of int

Methods

__construct()

__construct(\PhpOffice\PhpSpreadsheet\Style\Style  $style) 

Constructor.

Parameters

\PhpOffice\PhpSpreadsheet\Style\Style $style

The XF format

writeXf()

writeXf() : string

Generate an Excel BIFF XF record (style or cell).

Returns

string —

The XF record

setIsStyleXf()

setIsStyleXf(boolean  $value) 

Is this a style XF ?

Parameters

boolean $value

setBottomColor()

setBottomColor(integer  $colorIndex) 

Sets the cell's bottom border color.

Parameters

integer $colorIndex

Color index

setTopColor()

setTopColor(integer  $colorIndex) 

Sets the cell's top border color.

Parameters

integer $colorIndex

Color index

setLeftColor()

setLeftColor(integer  $colorIndex) 

Sets the cell's left border color.

Parameters

integer $colorIndex

Color index

setRightColor()

setRightColor(integer  $colorIndex) 

Sets the cell's right border color.

Parameters

integer $colorIndex

Color index

setDiagColor()

setDiagColor(integer  $colorIndex) 

Sets the cell's diagonal border color.

Parameters

integer $colorIndex

Color index

setFgColor()

setFgColor(integer  $colorIndex) 

Sets the cell's foreground color.

Parameters

integer $colorIndex

Color index

setBgColor()

setBgColor(integer  $colorIndex) 

Sets the cell's background color.

Parameters

integer $colorIndex

Color index

setNumberFormatIndex()

setNumberFormatIndex(integer  $numberFormatIndex) 

Sets the index to the number format record It can be date, time, currency, etc.

..

Parameters

integer $numberFormatIndex

Index to format record

setFontIndex()

setFontIndex(integer  $value) 

Set the font index.

Parameters

integer $value

Font index, note that value 4 does not exist

mapBorderStyle()

mapBorderStyle(string  $borderStyle) : integer

Map border style.

Parameters

string $borderStyle

Returns

integer

mapFillType()

mapFillType(string  $fillType) : integer

Map fill type.

Parameters

string $fillType

Returns

integer

mapHAlign()

mapHAlign(string  $hAlign) : integer

Map to BIFF2-BIFF8 codes for horizontal alignment.

Parameters

string $hAlign

Returns

integer

mapVAlign()

mapVAlign(string  $vAlign) : integer

Map to BIFF2-BIFF8 codes for vertical alignment.

Parameters

string $vAlign

Returns

integer

mapTextRotation()

mapTextRotation(integer  $textRotation) : integer

Map to BIFF8 codes for text rotation angle.

Parameters

integer $textRotation

Returns

integer

mapLocked()

mapLocked(string  $locked) : integer

Map locked.

Parameters

string $locked

Returns

integer

mapHidden()

mapHidden(string  $hidden) : integer

Map hidden.

Parameters

string $hidden

Returns

integer