Documentation

Xf
in package

Table of Contents

Constants

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

Properties

$backgroundColor  : int
The cell's background color.
$bottomBorderColor  : int
Color of the bottom border of the cell.
$diagColor  : int
$fontIndex  : int
Index to the FONT record. Index 4 does not exist.
$foregroundColor  : int
The cell's foreground color.
$isStyleXf  : bool
Style XF or a cell XF ?
$leftBorderColor  : int
Color of the left border of the cell.
$numberFormatIndex  : int
An index (2 bytes) to a FORMAT record (number format).
$rightBorderColor  : int
Color of the right border of the cell.
$style  : Style
$textJustLast  : int
1 bit, apparently not used.
$topBorderColor  : int
Color of the top border of the cell.

Methods

__construct()  : mixed
Constructor.
setBgColor()  : void
Sets the cell's background color.
setBottomColor()  : void
Sets the cell's bottom border color.
setDiagColor()  : void
Sets the cell's diagonal border color.
setFgColor()  : void
Sets the cell's foreground color.
setFontIndex()  : void
Set the font index.
setIsStyleXf()  : void
Is this a style XF ?
setLeftColor()  : void
Sets the cell's left border color.
setNumberFormatIndex()  : void
Sets the index to the number format record It can be date, time, currency, etc.
setRightColor()  : void
Sets the cell's right border color.
setTopColor()  : void
Sets the cell's top border color.
writeXf()  : string
Generate an Excel BIFF XF record (style or cell).
mapHidden()  : int
Map hidden.
mapLocked()  : int
Map locked values.
mapTextRotation()  : int
Map to BIFF8 codes for text rotation angle.

Constants

HIDDEN_ARRAY

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

LOCK_ARRAY

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

Properties

$backgroundColor

The cell's background color.

private int $backgroundColor

$bottomBorderColor

Color of the bottom border of the cell.

private int $bottomBorderColor

$diagColor

private int $diagColor

$fontIndex

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

private int $fontIndex

$foregroundColor

The cell's foreground color.

private int $foregroundColor

$isStyleXf

Style XF or a cell XF ?

private bool $isStyleXf

$leftBorderColor

Color of the left border of the cell.

private int $leftBorderColor

$numberFormatIndex

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

private int $numberFormatIndex

$rightBorderColor

Color of the right border of the cell.

private int $rightBorderColor

$textJustLast

1 bit, apparently not used.

private int $textJustLast

$topBorderColor

Color of the top border of the cell.

private int $topBorderColor

Methods

__construct()

Constructor.

public __construct(Style $style) : mixed
Parameters
$style : Style

The XF format

setBgColor()

Sets the cell's background color.

public setBgColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

setBottomColor()

Sets the cell's bottom border color.

public setBottomColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

setDiagColor()

Sets the cell's diagonal border color.

public setDiagColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

setFgColor()

Sets the cell's foreground color.

public setFgColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

setFontIndex()

Set the font index.

public setFontIndex(int $value) : void
Parameters
$value : int

Font index, note that value 4 does not exist

setIsStyleXf()

Is this a style XF ?

public setIsStyleXf(bool $value) : void
Parameters
$value : bool

setLeftColor()

Sets the cell's left border color.

public setLeftColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

setNumberFormatIndex()

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

public setNumberFormatIndex(int $numberFormatIndex) : void

..

Parameters
$numberFormatIndex : int

Index to format record

setRightColor()

Sets the cell's right border color.

public setRightColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

setTopColor()

Sets the cell's top border color.

public setTopColor(int $colorIndex) : void
Parameters
$colorIndex : int

Color index

writeXf()

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

public writeXf() : string
Return values
string

The XF record

mapHidden()

Map hidden.

private static mapHidden(string|null $hidden) : int
Parameters
$hidden : string|null
Return values
int

mapLocked()

Map locked values.

private static mapLocked(string|null $locked) : int
Parameters
$locked : string|null
Return values
int

mapTextRotation()

Map to BIFF8 codes for text rotation angle.

private static mapTextRotation(int $textRotation) : int
Parameters
$textRotation : int
Return values
int

        
On this page

Search results