Xf
Table of Contents
- HIDDEN_ARRAY = [PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_INHERIT => 0, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_PROTECTED => 1, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_UNPROTECTED => 0]
- LOCK_ARRAY = [PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_INHERIT => 1, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_PROTECTED => 1, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_UNPROTECTED => 0]
- $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.
- __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
= [PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_INHERIT => 0, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_PROTECTED => 1, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_UNPROTECTED => 0]
LOCK_ARRAY
private
mixed
LOCK_ARRAY
= [PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_INHERIT => 1, PhpOfficePhpSpreadsheetStyleProtection::PROTECTION_PROTECTED => 1, PhpOfficePhpSpreadsheetStyleProtection::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
$style
private
Style
$style
$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
Return values
mixed —setBgColor()
Sets the cell's background color.
public
setBgColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —setBottomColor()
Sets the cell's bottom border color.
public
setBottomColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —setDiagColor()
Sets the cell's diagonal border color.
public
setDiagColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —setFgColor()
Sets the cell's foreground color.
public
setFgColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —setFontIndex()
Set the font index.
public
setFontIndex(int $value) : void
Parameters
- $value : int
-
Font index, note that value 4 does not exist
Return values
void —setIsStyleXf()
Is this a style XF ?
public
setIsStyleXf(bool $value) : void
Parameters
- $value : bool
Return values
void —setLeftColor()
Sets the cell's left border color.
public
setLeftColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —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
Return values
void —setRightColor()
Sets the cell's right border color.
public
setRightColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —setTopColor()
Sets the cell's top border color.
public
setTopColor(int $colorIndex) : void
Parameters
- $colorIndex : int
-
Color index
Return values
void —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 $hidden) : int
Parameters
- $hidden : string
Return values
int —mapLocked()
Map locked values.
private
static mapLocked(string $locked) : int
Parameters
- $locked : string
Return values
int —mapTextRotation()
Map to BIFF8 codes for text rotation angle.
private
static mapTextRotation(int $textRotation) : int
Parameters
- $textRotation : int