category |
PHPExcel |
package |
PHPExcel |
copyright |
Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) |
Methods
Implement PHP __clone to create a deep clone, not just a shallow copy.
__clone()
Create a new PHPExcel with one Worksheet
__construct()
Code to execute when this worksheet is unset()
__destruct()
Add a cellStyleXf to the workbook
addCellStyleXf(\PHPExcel_Style $pStyle)
Add a cellXf to the workbook
addCellXf(\PHPExcel_Style $style)
Add external sheet
addExternalSheet(\PHPExcel_Worksheet $pSheet, int | null $iSheetIndex) : \PHPExcel_Worksheet
Parameters
$iSheetIndex
int
null
Index where sheet should go (0,1,..., or null for last)
Exceptions
Returns
Add named range
addNamedRange(\PHPExcel_NamedRange $namedRange) : \PHPExcel
Add sheet
addSheet(\PHPExcel_Worksheet $pSheet, int | null $iSheetIndex) : \PHPExcel_Worksheet
Parameters
$iSheetIndex
int
null
Index where sheet should go (0,1,..., or null for last)
Exceptions
Returns
Check if style exists in style collection
cellXfExists(\PHPExcel_Style $pCellStyle) : boolean
Parameters
Returns
boolean
Create sheet and add it to this workbook
createSheet(int | null $iSheetIndex) : \PHPExcel_Worksheet
Parameters
$iSheetIndex
int
null
Index where sheet should go (0,1,..., or null for last)
Exceptions
Returns
Remove all macros, certificate from spreadsheet
discardMacros() : void
Disconnect all worksheets from this PHPExcel workbook object,
typically so that the PHPExcel object can be unset
disconnectWorksheets()
Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells
and columns in the workbook
garbageCollect()
Get active sheet index
getActiveSheetIndex() : int
Returns
int
Active sheet index
Get cellStyleXf by hash code
getCellStyleXfByHashCode(string $pValue) : \PHPExcel_Style | false
Parameters
$pValue
string
Returns
Get cellStyleXf by index
getCellStyleXfByIndex(int $pIndex) : \PHPExcel_Style
Parameters
$pIndex
int
Returns
Get the workbook collection of cellStyleXfs
getCellStyleXfCollection() : \PHPExcel_Style[]
Get cellXf by hash code
getCellXfByHashCode(string $pValue) : \PHPExcel_Style | false
Parameters
$pValue
string
Returns
Get cellXf by index
getCellXfByIndex(int $pIndex) : \PHPExcel_Style
Parameters
$pIndex
int
Returns
Return the unique ID value assigned to this spreadsheet workbook
getID() : string
Get index for sheet
getIndex(\PHPExcel_Worksheet $pSheet) : \Sheet
Parameters
Exceptions
Returns
\Sheet
index
Return the macros certificate
getMacrosCertificate() : \binary | null
Return the macros code
getMacrosCode() : \binary | null
Get named range
getNamedRange(string $namedRange, \PHPExcel_Worksheet $pSheet) : \PHPExcel_NamedRange | null
Parameters
$namedRange
string
Returns
retrieve Binaries Ribbon Objects
getRibbonBinObjects($What)
retrieve ribbon XML Data
getRibbonXMLData($What)
Get sheet by code name.
getSheetByCodeName(string $pName) : \PHPExcel_Worksheet
Warning : sheet don't have always a code name !
Parameters
Returns
Get sheet count
getSheetCount() : int
Get sheet names
getSheetNames() : string[]
The workbook has macros ?
hasMacros() : true
Returns
true
if workbook has macros, false if not
Is the project signed ?
hasMacrosCertificate() : true | false
This workbook have a custom UI ?
hasRibbon() : true | false
This workbook have additionnal object for the ribbon ?
hasRibbonBinObjects() : true | false
Remove cellStyleXf by index
removeCellStyleXfByIndex(int $pIndex)
Parameters
$pIndex
int
Exceptions
Remove cellXf by index.
removeCellXfByIndex(int $pIndex)
It is ensured that all cells get their xf index updated.
Parameters
$pIndex
int
Index to cellXf
Exceptions
Remove named range
removeNamedRange(string $namedRange, \PHPExcel_Worksheet $pSheet) : \PHPExcel
Parameters
$namedRange
string
Returns
Remove sheet by index
removeSheetByIndex(int $pIndex)
Parameters
$pIndex
int
Active sheet index
Exceptions
Set active sheet index
setActiveSheetIndex(int $pIndex) : \PHPExcel_Worksheet
Parameters
$pIndex
int
Active sheet index
Exceptions
Returns
Set active sheet index by name
setActiveSheetIndexByName(string $pValue) : \PHPExcel_Worksheet
Parameters
$pValue
string
Sheet title
Exceptions
Returns
Define if a workbook has macros
setHasMacros(true | false $hasMacros)
Parameters
$hasMacros
true
false
Set index for sheet by sheet name.
setIndexByName(string $sheetName, int $newIndex) : \New
Parameters
$sheetName
string
Sheet name to modify index for
$newIndex
int
New index for the sheet
Exceptions
Returns
\New
sheet index
Set the macros certificate
setMacrosCertificate(\binary | null $Certificate)
Parameters
$Certificate
\binary
null
Set the macros code
setMacrosCode(\binary $MacrosCode)
Parameters
$MacrosCode
\binary
string|null
Set properties
setProperties(\PHPExcel_DocumentProperties $pValue)
store binaries ribbon objects (pictures)
setRibbonBinObjects($BinObjectsNames, $BinObjectsData)
Parameters
$BinObjectsNames
$BinObjectsData
set ribbon XML data
setRibbonXMLData($Target, $XMLData)
Parameters
$Target
$XMLData
Set security
setSecurity(\PHPExcel_DocumentSecurity $pValue)
Check if a sheet with a specified code name already exists
sheetCodeNameExists(string $pSheetCodeName) : boolean
Parameters
$pSheetCodeName
string
Name of the worksheet to check
Returns
boolean
Check if a sheet with a specified name already exists
sheetNameExists(string $pSheetName) : boolean
Parameters
$pSheetName
string
Name of the worksheet to check
Returns
boolean
return the extension of a filename.
_getExtensionOnly($ThePath)
Internal use for a array_map callback (php<5.3 don't like lambda function)
Parameters
$ThePath
Properties
$_macrosCertificate : \binary
$_ribbonBinObjects : NULL | array
$_ribbonXMLData : NULL | string