class uKnowvaExcel extends PHPExcel

This class is used to read and write excel files

Properties

Type $_writerType
string $_path

Methods

boolean
hasMacros()

The workbook has macros ?

from PHPExcel
setHasMacros(boolean $hasMacros = false)

Define if a workbook has macros

from PHPExcel
setMacrosCode(string $MacrosCode = null)

Set the macros code

from PHPExcel
string|null
getMacrosCode()

Return the macros code

from PHPExcel
setMacrosCertificate(string|null $Certificate = null)

Set the macros certificate

from PHPExcel
boolean
hasMacrosCertificate()

Is the project signed ?

from PHPExcel
string|null
getMacrosCertificate()

Return the macros certificate

from PHPExcel
discardMacros()

Remove all macros, certificate from spreadsheet

from PHPExcel
setRibbonXMLData($Target = null, $XMLData = null)

set ribbon XML data

from PHPExcel
getRibbonXMLData($What = 'all')

retrieve ribbon XML Data

from PHPExcel
setRibbonBinObjects($BinObjectsNames = null, $BinObjectsData = null)

store binaries ribbon objects (pictures)

from PHPExcel
getRibbonBinObjects($What = 'all')

retrieve Binaries Ribbon Objects

from PHPExcel
boolean
hasRibbon()

This workbook have a custom UI ?

from PHPExcel
boolean
hasRibbonBinObjects()

This workbook have additionnal object for the ribbon ?

from PHPExcel
boolean
sheetCodeNameExists(string $pSheetCodeName)

Check if a sheet with a specified code name already exists

from PHPExcel
getSheetByCodeName(string $pName = '')

Get sheet by code name. Warning : sheet don't have always a code name !

from PHPExcel
__construct()

creates an instance of uKnowva EXCEL and returns the object

__destruct()

Code to execute when this worksheet is unset()

from PHPExcel
disconnectWorksheets()

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

from PHPExcel
getCalculationEngine()

Return the calculation engine for this worksheet

from PHPExcel
setProperties(PHPExcel_DocumentProperties $pValue)

Set properties

from PHPExcel
setSecurity(PHPExcel_DocumentSecurity $pValue)

Set security

from PHPExcel
getActiveSheet()

Get active sheet

from PHPExcel
createSheet(int|null $iSheetIndex = null)

Create sheet and add it to this workbook

from PHPExcel
boolean
sheetNameExists(string $pSheetName)

Check if a sheet with a specified name already exists

from PHPExcel
addSheet(PHPExcel_Worksheet $pSheet, int|null $iSheetIndex = null)

Add sheet

from PHPExcel
removeSheetByIndex(int $pIndex)

Remove sheet by index

from PHPExcel
getSheet(int $pIndex)

Get sheet by index

from PHPExcel
getAllSheets()

Get all sheets

from PHPExcel
getSheetByName(string $pName = '')

Get sheet by name

from PHPExcel
int
getIndex(PHPExcel_Worksheet $pSheet)

Get index for sheet

from PHPExcel
int
setIndexByName(string $sheetName, int $newIndex)

Set index for sheet by sheet name.

from PHPExcel
int
getSheetCount()

Get sheet count

from PHPExcel
int
getActiveSheetIndex()

Get active sheet index

from PHPExcel
setActiveSheetIndex(int $pIndex)

Set active sheet index

from PHPExcel
setActiveSheetIndexByName(string $pValue = '')

Set active sheet index by name

from PHPExcel
string[]
getSheetNames()

Get sheet names

from PHPExcel
addExternalSheet(PHPExcel_Worksheet $pSheet, int|null $iSheetIndex = null)

Add external sheet

from PHPExcel
getNamedRanges()

Get named ranges

from PHPExcel
boolean
addNamedRange(PHPExcel_NamedRange $namedRange)

Add named range

from PHPExcel
getNamedRange(string $namedRange, PHPExcel_Worksheet $pSheet = null)

Get named range

from PHPExcel
removeNamedRange(string $namedRange, PHPExcel_Worksheet $pSheet = null)

Remove named range

from PHPExcel
copy()

Copy workbook (!= clone!)

from PHPExcel
__clone()

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

from PHPExcel
getCellXfCollection()

Get the workbook collection of cellXfs

from PHPExcel
getCellXfByIndex(int $pIndex)

Get cellXf by index

from PHPExcel
PHPExcel_Style|boolean
getCellXfByHashCode(string $pValue = '')

Get cellXf by hash code

from PHPExcel
boolean
cellXfExists(PHPExcel_Style $pCellStyle = null)

Check if style exists in style collection

from PHPExcel
getDefaultStyle()

Get default style

from PHPExcel
addCellXf(PHPExcel_Style $style)

Add a cellXf to the workbook

from PHPExcel
removeCellXfByIndex(integer $pIndex)

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

from PHPExcel
getCellXfSupervisor()

Get the cellXf supervisor

from PHPExcel
getCellStyleXfCollection()

Get the workbook collection of cellStyleXfs

from PHPExcel
getCellStyleXfByIndex(integer $pIndex)

Get cellStyleXf by index

from PHPExcel
PHPExcel_Style|boolean
getCellStyleXfByHashCode(string $pValue = '')

Get cellStyleXf by hash code

from PHPExcel
addCellStyleXf(PHPExcel_Style $pStyle)

Add a cellStyleXf to the workbook

from PHPExcel
removeCellStyleXfByIndex(integer $pIndex)

Remove cellStyleXf by index

from PHPExcel
garbageCollect()

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

from PHPExcel
string
getID()

Return the unique ID value assigned to this spreadsheet workbook

from PHPExcel
getInstance(string $path = null, PHPExcel_Writer_IWriter $writerType = 'Excel2007', array $options = array())

creates an instance of uKnowva EXCEL and returns the object

getWriter()

returns the writer object for this excel file

save()

saves the current excel file to the location defined in $this->_path

the
write()

same as the save function

getPath()

returns the location of the excelfile currnetly being worked upon

the
getWriterType()

No description

Details

in PHPExcel at line 157
boolean hasMacros()

The workbook has macros ?

Return Value

boolean true if workbook has macros, false if not

in PHPExcel at line 167
setHasMacros(boolean $hasMacros = false)

Define if a workbook has macros

Parameters

boolean $hasMacros true|false

in PHPExcel at line 177
setMacrosCode(string $MacrosCode = null)

Set the macros code

Parameters

string $MacrosCode string|null

in PHPExcel at line 188
string|null getMacrosCode()

Return the macros code

Return Value

string|null

in PHPExcel at line 198
setMacrosCertificate(string|null $Certificate = null)

Set the macros certificate

Parameters

string|null $Certificate

in PHPExcel at line 208
boolean hasMacrosCertificate()

Is the project signed ?

Return Value

boolean true|false

in PHPExcel at line 218
string|null getMacrosCertificate()

Return the macros certificate

Return Value

string|null

in PHPExcel at line 227
discardMacros()

Remove all macros, certificate from spreadsheet

in PHPExcel at line 238
setRibbonXMLData($Target = null, $XMLData = null)

set ribbon XML data

Parameters

$Target
$XMLData

in PHPExcel at line 252
getRibbonXMLData($What = 'all')

retrieve ribbon XML Data

return string|null|array

Parameters

$What

in PHPExcel at line 275
setRibbonBinObjects($BinObjectsNames = null, $BinObjectsData = null)

store binaries ribbon objects (pictures)

Parameters

$BinObjectsNames
$BinObjectsData

in PHPExcel at line 296
getRibbonBinObjects($What = 'all')

retrieve Binaries Ribbon Objects

Parameters

$What

in PHPExcel at line 328
boolean hasRibbon()

This workbook have a custom UI ?

Return Value

boolean true|false

in PHPExcel at line 338
boolean hasRibbonBinObjects()

This workbook have additionnal object for the ribbon ?

Return Value

boolean true|false

in PHPExcel at line 349
boolean sheetCodeNameExists(string $pSheetCodeName)

Check if a sheet with a specified code name already exists

Parameters

string $pSheetCodeName Name of the worksheet to check

Return Value

boolean

in PHPExcel at line 360
PHPExcel_Worksheet getSheetByCodeName(string $pName = '')

Get sheet by code name. Warning : sheet don't have always a code name !

Parameters

string $pName Sheet name

Return Value

PHPExcel_Worksheet

at line 35
__construct()

creates an instance of uKnowva EXCEL and returns the object

in PHPExcel at line 407
__destruct()

Code to execute when this worksheet is unset()

in PHPExcel at line 418
disconnectWorksheets()

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

in PHPExcel at line 434
PHPExcel_Calculation getCalculationEngine()

Return the calculation engine for this worksheet

Return Value

PHPExcel_Calculation

in PHPExcel at line 444
PHPExcel_DocumentProperties getProperties()

Get properties

in PHPExcel at line 454
setProperties(PHPExcel_DocumentProperties $pValue)

Set properties

Parameters

PHPExcel_DocumentProperties $pValue

in PHPExcel at line 464
PHPExcel_DocumentSecurity getSecurity()

Get security

in PHPExcel at line 474
setSecurity(PHPExcel_DocumentSecurity $pValue)

Set security

Parameters

PHPExcel_DocumentSecurity $pValue

in PHPExcel at line 486
PHPExcel_Worksheet getActiveSheet()

Get active sheet

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 498
PHPExcel_Worksheet createSheet(int|null $iSheetIndex = null)

Create sheet and add it to this workbook

Parameters

int|null $iSheetIndex Index where sheet should go (0,1,..., or null for last)

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 511
boolean sheetNameExists(string $pSheetName)

Check if a sheet with a specified name already exists

Parameters

string $pSheetName Name of the worksheet to check

Return Value

boolean

in PHPExcel at line 524
PHPExcel_Worksheet addSheet(PHPExcel_Worksheet $pSheet, int|null $iSheetIndex = null)

Add sheet

Parameters

PHPExcel_Worksheet $pSheet
int|null $iSheetIndex Index where sheet should go (0,1,..., or null for last)

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 565
removeSheetByIndex(int $pIndex)

Remove sheet by index

Parameters

int $pIndex Active sheet index

Exceptions

PHPExcel_Exception

in PHPExcel at line 591
PHPExcel_Worksheet getSheet(int $pIndex)

Get sheet by index

Parameters

int $pIndex Sheet index

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 608
PHPExcel_Worksheet[] getAllSheets()

Get all sheets

Return Value

PHPExcel_Worksheet[]

in PHPExcel at line 619
PHPExcel_Worksheet getSheetByName(string $pName = '')

Get sheet by name

Parameters

string $pName Sheet name

Return Value

PHPExcel_Worksheet

in PHPExcel at line 638
int getIndex(PHPExcel_Worksheet $pSheet)

Get index for sheet

Parameters

PHPExcel_Worksheet $pSheet

Return Value

int Sheet index

Exceptions

PHPExcel_Exception

in PHPExcel at line 657
int setIndexByName(string $sheetName, int $newIndex)

Set index for sheet by sheet name.

Parameters

string $sheetName Sheet name to modify index for
int $newIndex New index for the sheet

Return Value

int New sheet index

Exceptions

PHPExcel_Exception

in PHPExcel at line 679
int getSheetCount()

Get sheet count

Return Value

int

in PHPExcel at line 689
int getActiveSheetIndex()

Get active sheet index

Return Value

int Active sheet index

in PHPExcel at line 701
PHPExcel_Worksheet setActiveSheetIndex(int $pIndex)

Set active sheet index

Parameters

int $pIndex Active sheet index

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 722
PHPExcel_Worksheet setActiveSheetIndexByName(string $pValue = '')

Set active sheet index by name

Parameters

string $pValue Sheet title

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 737
string[] getSheetNames()

Get sheet names

Return Value

string[]

in PHPExcel at line 756
PHPExcel_Worksheet addExternalSheet(PHPExcel_Worksheet $pSheet, int|null $iSheetIndex = null)

Add external sheet

Parameters

PHPExcel_Worksheet $pSheet External sheet to add
int|null $iSheetIndex Index where sheet should go (0,1,..., or null for last)

Return Value

PHPExcel_Worksheet

Exceptions

PHPExcel_Exception

in PHPExcel at line 787
PHPExcel_NamedRange[] getNamedRanges()

Get named ranges

Return Value

PHPExcel_NamedRange[]

in PHPExcel at line 798
boolean addNamedRange(PHPExcel_NamedRange $namedRange)

Add named range

Parameters

PHPExcel_NamedRange $namedRange

Return Value

boolean

in PHPExcel at line 817
PHPExcel_NamedRange|null getNamedRange(string $namedRange, PHPExcel_Worksheet $pSheet = null)

Get named range

Parameters

string $namedRange
PHPExcel_Worksheet $pSheet Scope. Use null for global scope

Return Value

PHPExcel_NamedRange|null

in PHPExcel at line 843
PHPExcel removeNamedRange(string $namedRange, PHPExcel_Worksheet $pSheet = null)

Remove named range

Parameters

string $namedRange
PHPExcel_Worksheet $pSheet Scope: use null for global scope.

Return Value

PHPExcel

in PHPExcel at line 862
PHPExcel_WorksheetIterator getWorksheetIterator()

Get worksheet iterator

in PHPExcel at line 872
PHPExcel copy()

Copy workbook (!= clone!)

Return Value

PHPExcel

in PHPExcel at line 888
__clone()

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

in PHPExcel at line 902
PHPExcel_Style[] getCellXfCollection()

Get the workbook collection of cellXfs

Return Value

PHPExcel_Style[]

in PHPExcel at line 913
PHPExcel_Style getCellXfByIndex(int $pIndex)

Get cellXf by index

Parameters

int $pIndex

Return Value

PHPExcel_Style

in PHPExcel at line 924
PHPExcel_Style|boolean getCellXfByHashCode(string $pValue = '')

Get cellXf by hash code

Parameters

string $pValue

Return Value

PHPExcel_Style|boolean False if no match found

in PHPExcel at line 940
boolean cellXfExists(PHPExcel_Style $pCellStyle = null)

Check if style exists in style collection

Parameters

PHPExcel_Style $pCellStyle

Return Value

boolean

in PHPExcel at line 951
PHPExcel_Style getDefaultStyle()

Get default style

Return Value

PHPExcel_Style

Exceptions

PHPExcel_Exception

in PHPExcel at line 964
addCellXf(PHPExcel_Style $style)

Add a cellXf to the workbook

Parameters

PHPExcel_Style $style

in PHPExcel at line 976
removeCellXfByIndex(integer $pIndex)

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

Parameters

integer $pIndex Index to cellXf

Exceptions

PHPExcel_Exception

in PHPExcel at line 1006
PHPExcel_Style getCellXfSupervisor()

Get the cellXf supervisor

Return Value

PHPExcel_Style

in PHPExcel at line 1016
PHPExcel_Style[] getCellStyleXfCollection()

Get the workbook collection of cellStyleXfs

Return Value

PHPExcel_Style[]

in PHPExcel at line 1027
PHPExcel_Style getCellStyleXfByIndex(integer $pIndex)

Get cellStyleXf by index

Parameters

integer $pIndex Index to cellXf

Return Value

PHPExcel_Style

in PHPExcel at line 1038
PHPExcel_Style|boolean getCellStyleXfByHashCode(string $pValue = '')

Get cellStyleXf by hash code

Parameters

string $pValue

Return Value

PHPExcel_Style|boolean False if no match found

in PHPExcel at line 1053
addCellStyleXf(PHPExcel_Style $pStyle)

Add a cellStyleXf to the workbook

Parameters

PHPExcel_Style $pStyle

in PHPExcel at line 1065
removeCellStyleXfByIndex(integer $pIndex)

Remove cellStyleXf by index

Parameters

integer $pIndex Index to cellXf

Exceptions

PHPExcel_Exception

in PHPExcel at line 1078
garbageCollect()

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

in PHPExcel at line 1160
string getID()

Return the unique ID value assigned to this spreadsheet workbook

Return Value

string

at line 45
getInstance(string $path = null, PHPExcel_Writer_IWriter $writerType = 'Excel2007', array $options = array())

creates an instance of uKnowva EXCEL and returns the object

Parameters

string $path if an already existing file needs to be loaded or the actual path on which the file needs to be written in the save function
PHPExcel_Writer_IWriter $writerType Excel5, Excel2007
array $options an array of options like title, description, subject, keywords, category

at line 92
getWriter()

returns the writer object for this excel file

at line 101
save()

saves the current excel file to the location defined in $this->_path

at line 109
the write()

same as the save function

Return Value

the path just written

at line 117
getPath()

returns the location of the excelfile currnetly being worked upon

at line 123
the getWriterType()

Return Value

the writerType