Properties

$_uniqueID

$_uniqueID : string

Unique ID

Type

string

$_workSheetCollection

$_workSheetCollection : array<mixed,\PHPExcel_Worksheet>

Collection of Worksheet objects

Type

array<mixed,\PHPExcel_Worksheet>

$_calculationEngine

$_calculationEngine : \PHPExcel_Calculation

Calculation Engine

Type

\PHPExcel_Calculation

$_activeSheetIndex

$_activeSheetIndex : integer

Active sheet index

Type

integer

$_namedRanges

$_namedRanges : array<mixed,\PHPExcel_NamedRange>

Named ranges

Type

array<mixed,\PHPExcel_NamedRange>

$_cellXfSupervisor

$_cellXfSupervisor : \PHPExcel_Style

CellXf supervisor

Type

\PHPExcel_Style

$_cellXfCollection

$_cellXfCollection : array<mixed,\PHPExcel_Style>

CellXf collection

Type

array<mixed,\PHPExcel_Style>

$_cellStyleXfCollection

$_cellStyleXfCollection : array<mixed,\PHPExcel_Style>

CellStyleXf collection

Type

array<mixed,\PHPExcel_Style>

Methods

__construct()

__construct() 

Create a new PHPExcel with one Worksheet

__destruct()

__destruct() 

Code to execute when this worksheet is unset()

disconnectWorksheets()

disconnectWorksheets() 

Disconnect all worksheets from this PHPExcel workbook object, typically so that the PHPExcel object can be unset

getCalculationEngine()

getCalculationEngine() : \PHPExcel_Calculation

Return the calculation engine for this worksheet

Returns

\PHPExcel_Calculation

getActiveSheet()

getActiveSheet() : \PHPExcel_Worksheet

Get active sheet

Returns

\PHPExcel_Worksheet

createSheet()

createSheet(integer|null  $iSheetIndex = NULL) : \PHPExcel_Worksheet

Create sheet and add it to this workbook

Parameters

integer|null $iSheetIndex

Index where sheet should go (0,1,..., or null for last)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet

sheetNameExists()

sheetNameExists(string  $pSheetName) : boolean

Check if a sheet with a specified name already exists

Parameters

string $pSheetName

Name of the worksheet to check

Returns

boolean

addSheet()

addSheet(\PHPExcel_Worksheet  $pSheet, integer|null  $iSheetIndex = NULL) : \PHPExcel_Worksheet

Add sheet

Parameters

\PHPExcel_Worksheet $pSheet
integer|null $iSheetIndex

Index where sheet should go (0,1,..., or null for last)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet

removeSheetByIndex()

removeSheetByIndex(integer  $pIndex) 

Remove sheet by index

Parameters

integer $pIndex

Active sheet index

Throws

\PHPExcel_Exception

getSheet()

getSheet(integer  $pIndex) : \PHPExcel_Worksheet

Get sheet by index

Parameters

integer $pIndex

Sheet index

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet

getAllSheets()

getAllSheets() : array<mixed,\PHPExcel_Worksheet>

Get all sheets

Returns

array<mixed,\PHPExcel_Worksheet>

getSheetByName()

getSheetByName(string  $pName = '') : \PHPExcel_Worksheet

Get sheet by name

Parameters

string $pName

Sheet name

Returns

\PHPExcel_Worksheet

getIndex()

getIndex(\PHPExcel_Worksheet  $pSheet) : \Sheet

Get index for sheet

Parameters

\PHPExcel_Worksheet $pSheet

Throws

\PHPExcel_Exception

Returns

\Sheet —

index

setIndexByName()

setIndexByName(string  $sheetName, integer  $newIndex) : \New

Set index for sheet by sheet name.

Parameters

string $sheetName

Sheet name to modify index for

integer $newIndex

New index for the sheet

Throws

\PHPExcel_Exception

Returns

\New —

sheet index

getSheetCount()

getSheetCount() : integer

Get sheet count

Returns

integer

getActiveSheetIndex()

getActiveSheetIndex() : integer

Get active sheet index

Returns

integer —

Active sheet index

setActiveSheetIndex()

setActiveSheetIndex(integer  $pIndex) : \PHPExcel_Worksheet

Set active sheet index

Parameters

integer $pIndex

Active sheet index

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet

setActiveSheetIndexByName()

setActiveSheetIndexByName(string  $pValue = '') : \PHPExcel_Worksheet

Set active sheet index by name

Parameters

string $pValue

Sheet title

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet

getSheetNames()

getSheetNames() : array<mixed,string>

Get sheet names

Returns

array<mixed,string>

addExternalSheet()

addExternalSheet(\PHPExcel_Worksheet  $pSheet, integer|null  $iSheetIndex = null) : \PHPExcel_Worksheet

Add external sheet

Parameters

\PHPExcel_Worksheet $pSheet

External sheet to add

integer|null $iSheetIndex

Index where sheet should go (0,1,..., or null for last)

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Worksheet

getNamedRanges()

getNamedRanges() : array<mixed,\PHPExcel_NamedRange>

Get named ranges

Returns

array<mixed,\PHPExcel_NamedRange>

addNamedRange()

addNamedRange(\PHPExcel_NamedRange  $namedRange) : \PHPExcel

Add named range

Parameters

\PHPExcel_NamedRange $namedRange

Returns

\PHPExcel

getNamedRange()

getNamedRange(string  $namedRange, \PHPExcel_Worksheet|null  $pSheet = null) : \PHPExcel_NamedRange|null

Get named range

Parameters

string $namedRange
\PHPExcel_Worksheet|null $pSheet

Scope. Use null for global scope

Returns

\PHPExcel_NamedRange|null

removeNamedRange()

removeNamedRange(string  $namedRange, \PHPExcel_Worksheet|null  $pSheet = null) : \PHPExcel

Remove named range

Parameters

string $namedRange
\PHPExcel_Worksheet|null $pSheet

Scope: use null for global scope.

Returns

\PHPExcel

getWorksheetIterator()

getWorksheetIterator() : \PHPExcel_WorksheetIterator

Get worksheet iterator

Returns

\PHPExcel_WorksheetIterator

copy()

copy() : \PHPExcel

Copy workbook (!= clone!)

Returns

\PHPExcel

__clone()

__clone() 

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

getCellXfCollection()

getCellXfCollection() : array<mixed,\PHPExcel_Style>

Get the workbook collection of cellXfs

Returns

array<mixed,\PHPExcel_Style>

getCellXfByIndex()

getCellXfByIndex(integer  $pIndex) : \PHPExcel_Style

Get cellXf by index

Parameters

integer $pIndex

Returns

\PHPExcel_Style

getCellXfByHashCode()

getCellXfByHashCode(string  $pValue = '') : \PHPExcel_Style|false

Get cellXf by hash code

Parameters

string $pValue

Returns

\PHPExcel_Style|false

cellXfExists()

cellXfExists(\PHPExcel_Style  $pCellStyle = null) : boolean

Check if style exists in style collection

Parameters

\PHPExcel_Style $pCellStyle

Returns

boolean

getDefaultStyle()

getDefaultStyle() : \PHPExcel_Style

Get default style

Throws

\PHPExcel_Exception

Returns

\PHPExcel_Style

addCellXf()

addCellXf(\PHPExcel_Style  $style) 

Add a cellXf to the workbook

Parameters

\PHPExcel_Style $style

removeCellXfByIndex()

removeCellXfByIndex(integer  $pIndex) 

Remove cellXf by index. It is ensured that all cells get their xf index updated.

Parameters

integer $pIndex

Index to cellXf

Throws

\PHPExcel_Exception

getCellXfSupervisor()

getCellXfSupervisor() : \PHPExcel_Style

Get the cellXf supervisor

Returns

\PHPExcel_Style

getCellStyleXfCollection()

getCellStyleXfCollection() : array<mixed,\PHPExcel_Style>

Get the workbook collection of cellStyleXfs

Returns

array<mixed,\PHPExcel_Style>

getCellStyleXfByIndex()

getCellStyleXfByIndex(integer  $pIndex) : \PHPExcel_Style

Get cellStyleXf by index

Parameters

integer $pIndex

Returns

\PHPExcel_Style

getCellStyleXfByHashCode()

getCellStyleXfByHashCode(string  $pValue = '') : \PHPExcel_Style|false

Get cellStyleXf by hash code

Parameters

string $pValue

Returns

\PHPExcel_Style|false

addCellStyleXf()

addCellStyleXf(\PHPExcel_Style  $pStyle) 

Add a cellStyleXf to the workbook

Parameters

\PHPExcel_Style $pStyle

removeCellStyleXfByIndex()

removeCellStyleXfByIndex(integer  $pIndex) 

Remove cellStyleXf by index

Parameters

integer $pIndex

Throws

\PHPExcel_Exception

garbageCollect()

garbageCollect() 

Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells and columns in the workbook

getID()

getID() : string

Return the unique ID value assigned to this spreadsheet workbook

Returns

string