Constants

LOCK_ARRAY

LOCK_ARRAY = [\PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_INHERIT => 1, \PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_PROTECTED => 1, \PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_UNPROTECTED => 0]

HIDDEN_ARRAY

HIDDEN_ARRAY = [\PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_INHERIT => 0, \PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_PROTECTED => 1, \PhpOffice\PhpSpreadsheet\Style\Protection::PROTECTION_UNPROTECTED => 0]

Properties

$isStyleXf

$isStyleXf : bool

Style XF or a cell XF ?

Type

bool

$fontIndex

$fontIndex : int

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

Type

int

$numberFormatIndex

$numberFormatIndex : int

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

Type

int

$textJustLast

$textJustLast : int

1 bit, apparently not used.

Type

int

$foregroundColor

$foregroundColor : int

The cell's foreground color.

Type

int

$backgroundColor

$backgroundColor : int

The cell's background color.

Type

int

$bottomBorderColor

$bottomBorderColor : int

Color of the bottom border of the cell.

Type

int

$topBorderColor

$topBorderColor : int

Color of the top border of the cell.

Type

int

$leftBorderColor

$leftBorderColor : int

Color of the left border of the cell.

Type

int

$rightBorderColor

$rightBorderColor : int

Color of the right border of the cell.

Type

int

$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) : mixed

Constructor.

Parameters

\PhpOffice\PhpSpreadsheet\Style\Style $style

The XF format

Returns

mixed —

writeXf()

writeXf() : string

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

Returns

string —

The XF record

setIsStyleXf()

setIsStyleXf(bool  $value) : void

Is this a style XF ?

Parameters

bool $value

setBottomColor()

setBottomColor(int  $colorIndex) : void

Sets the cell's bottom border color.

Parameters

int $colorIndex

Color index

setTopColor()

setTopColor(int  $colorIndex) : void

Sets the cell's top border color.

Parameters

int $colorIndex

Color index

setLeftColor()

setLeftColor(int  $colorIndex) : void

Sets the cell's left border color.

Parameters

int $colorIndex

Color index

setRightColor()

setRightColor(int  $colorIndex) : void

Sets the cell's right border color.

Parameters

int $colorIndex

Color index

setDiagColor()

setDiagColor(int  $colorIndex) : void

Sets the cell's diagonal border color.

Parameters

int $colorIndex

Color index

setFgColor()

setFgColor(int  $colorIndex) : void

Sets the cell's foreground color.

Parameters

int $colorIndex

Color index

setBgColor()

setBgColor(int  $colorIndex) : void

Sets the cell's background color.

Parameters

int $colorIndex

Color index

setNumberFormatIndex()

setNumberFormatIndex(int  $numberFormatIndex) : void

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

..

Parameters

int $numberFormatIndex

Index to format record

setFontIndex()

setFontIndex(int  $value) : void

Set the font index.

Parameters

int $value

Font index, note that value 4 does not exist

mapBorderStyle()

mapBorderStyle(string  $borderStyle) : int

Map border style.

Parameters

string $borderStyle

Returns

int —

mapFillType()

mapFillType(string  $fillType) : int

Map fill type.

Parameters

string $fillType

Returns

int —

mapHAlign()

mapHAlign(string  $hAlign) : int

Map to BIFF2-BIFF8 codes for horizontal alignment.

Parameters

string $hAlign

Returns

int —

mapVAlign()

mapVAlign(string  $vAlign) : int

Map to BIFF2-BIFF8 codes for vertical alignment.

Parameters

string $vAlign

Returns

int —

mapTextRotation()

mapTextRotation(int  $textRotation) : int

Map to BIFF8 codes for text rotation angle.

Parameters

int $textRotation

Returns

int —

mapLocked()

mapLocked(string  $locked) : int

Map locked values.

Parameters

string $locked

Returns

int —

mapHidden()

mapHidden(string  $hidden) : int

Map hidden.

Parameters

string $hidden

Returns

int —