PHPExcel_Style_Font

category PHPExcel
package PHPExcel_Style
copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

 Methods

Implement PHP __clone to create a deep clone, not just a shallow copy.

__clone() 
Inherited
inherited_from \PHPExcel_Style_Supervisor::__clone()

Create a new PHPExcel_Style_Font

__construct(boolean $isSupervisor, boolean $isConditional) 

Parameters

$isSupervisor

boolean

Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are

$isConditional

boolean

Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are

Apply styles from array

applyFromArray(array $pStyles) : \PHPExcel_Style_Font
$objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray(
    array(
        'name'      => 'Arial',
        'bold'      => TRUE,
        'italic'    => FALSE,
        'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE,
        'strike'    => FALSE,
        'color'     => array(
            'rgb' => '808080'
        )
    )
);

Parameters

$pStyles

array

Array containing style information

Exceptions

\PHPExcel_Exception

Returns

Bind parent.

bindParent(\PHPExcel $parent, $parentPropertyName) : \PHPExcel_Style_Supervisor
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::bindParent()

Parameters

$parent

\PHPExcel

$parentPropertyName

Returns

Get the currently active cell coordinate in currently active sheet.

getActiveCell() : string
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::getActiveCell()

Returns

stringE.g. 'A1'

Get the currently active sheet.

getActiveSheet() : \PHPExcel_Worksheet
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::getActiveSheet()

Returns

Get Bold

getBold() : boolean

Returns

boolean

Get Color

getColor() : \PHPExcel_Style_Color

Get hash code

getHashCode() : string

Returns

stringHash code

Is this a supervisor or a cell style component?

getIsSupervisor() : boolean
Inherited
inherited_from \PHPExcel_Style_Supervisor::getIsSupervisor()

Returns

boolean

Get Italic

getItalic() : boolean

Returns

boolean

Get Name

getName() : string

Returns

string

Get the currently active cell coordinate in currently active sheet.

getSelectedCells() : string
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::getSelectedCells()

Returns

stringE.g. 'A1'

Get the shared style component for the currently active cell in currently active sheet.

getSharedComponent() : \PHPExcel_Style_Font

Only used for style supervisor

Returns

Get Size

getSize() : double

Returns

double

Get Strikethrough

getStrikethrough() : boolean

Returns

boolean

Build style array from subcomponents

getStyleArray(array $array) : array

Parameters

$array

array

Returns

array

Get SubScript

getSubScript() : boolean

Returns

boolean

Get SuperScript

getSuperScript() : boolean

Returns

boolean

Get Underline

getUnderline() : string

Returns

string

Set Bold

setBold(boolean $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

boolean

Returns

Set Color

setColor(\PHPExcel_Style_Color $pValue) : \PHPExcel_Style_Font

Parameters

Exceptions

\PHPExcel_Exception

Returns

Set Italic

setItalic(boolean $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

boolean

Returns

Set Name

setName(string $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

string

Returns

Set Size

setSize(double $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

double

Returns

Set Strikethrough

setStrikethrough(boolean $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

boolean

Returns

Set SubScript

setSubScript(boolean $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

boolean

Returns

Set SuperScript

setSuperScript(boolean $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

boolean

Returns

Set Underline

setUnderline(string | boolean $pValue) : \PHPExcel_Style_Font

Parameters

$pValue

stringboolean

PHPExcel_Style_Font underline type If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, false equates to UNDERLINE_NONE

Returns

 Properties

 

$_bold : boolean
 

$_color : \PHPExcel_Style_Color
 

$_isSupervisor : boolean
Inherited
inherited_from \PHPExcel_Style_Supervisor::$$_isSupervisor
 

$_italic : boolean
 

$_name : string
 

$_parent : \PHPExcel_Style
Inherited

Only used for supervisor

inherited_from \PHPExcel_Style_Supervisor::$$_parent
 

$_size : float
 

$_strikethrough : boolean
 

$_subScript : boolean
 

$_superScript : boolean
 

$_underline : string

 Constants

 

UNDERLINE_DOUBLE

UNDERLINE_DOUBLE 
 

UNDERLINE_DOUBLEACCOUNTING

UNDERLINE_DOUBLEACCOUNTING 
 

UNDERLINE_NONE

UNDERLINE_NONE 
 

UNDERLINE_SINGLE

UNDERLINE_SINGLE 
 

UNDERLINE_SINGLEACCOUNTING

UNDERLINE_SINGLEACCOUNTING