PHPExcel

# Class: PHPExcel

Source Location: /PHPExcel.php

### Class Overview

PHPExcel

#### Author(s):

#### Copyright:

- Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

- __construct
- addCellStyleXf
- addCellXf
- addExternalSheet
- addNamedRange
- addSheet
- copy
- createSheet
- disconnectWorksheets
- garbageCollect
- getActiveSheet
- getActiveSheetIndex
- getAllSheets
- getCellStyleXfByHashCode
- getCellStyleXfByIndex
- getCellStyleXfCollection
- getCellXfByHashCode
- getCellXfByIndex
- getCellXfCollection
- getCellXfSupervisor
- getDefaultStyle
- getIndex
- getNamedRange
- getNamedRanges
- getProperties
- getSecurity
- getSheet
- getSheetByName
- getSheetCount
- getSheetNames
- getWorksheetIterator
- removeCellStyleXfByIndex
- removeCellXfByIndex
- removeNamedRange
- removeSheetByIndex
- setActiveSheetIndex
- setActiveSheetIndexByName
- setIndexByName
- setProperties
- setSecurity
- sheetNameExists
- __clone

### Class Details

[line 43]
PHPExcel

#### Tags:

copyright: | Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

[ Top ]

### Class Methods

### constructor __construct [line 104]

`PHPExcel __construct( )`

Create a new PHPExcel with one Worksheet

#### Tags:

access: | public

[ Top ]

### method addCellStyleXf [line 718]

`void addCellStyleXf( PHPExcel_Style $pStyle)`

Add a cellStyleXf to the workbook

#### Tags:

access: | public

#### Parameters:

PHPExcel_Style | $pStyle |

[ Top ]

### method addCellXf [line 629]

`void addCellXf( PHPExcel_Style $style)`

Add a cellXf to the workbook

#### Tags:

access: | public

#### Parameters:

PHPExcel_Style | $style |

[ Top ]

### method addExternalSheet [line 440]

`PHPExcel_Worksheet addExternalSheet( PHPExcel_Worksheet $pSheet, [int|null $iSheetIndex = null])`

Add external sheet

#### Tags:

throws: | Exception
access: | public

#### Parameters:

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

[ Top ]

### method addNamedRange [line 480]

`PHPExcel addNamedRange( PHPExcel_NamedRange $namedRange)`

Add named range

#### Tags:

access: | public

#### Parameters:

PHPExcel_NamedRange | $namedRange |

[ Top ]

### method addSheet [line 227]

`PHPExcel_Worksheet addSheet( PHPExcel_Worksheet $pSheet, [int|null $iSheetIndex = NULL])`

Add sheet

#### Tags:

throws: | Exception
access: | public

#### Parameters:

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

[ Top ]

### method copy [line 550]

`PHPExcel copy( )`

Copy workbook (!= clone!)

#### Tags:

access: | public

[ Top ]

### method createSheet [line 201]

`PHPExcel_Worksheet createSheet( [int|null $iSheetIndex = NULL])`

Create sheet and add it to this workbook

#### Tags:

throws: | Exception
access: | public

#### Parameters:

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

[ Top ]

### method disconnectWorksheets [line 135]

`void disconnectWorksheets( )`

Disconnect all worksheets from this PHPExcel workbook object,

typically so that the PHPExcel object can be unset

#### Tags:

access: | public

[ Top ]

### method garbageCollect [line 743]

`void garbageCollect( )`

Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells

and columns in the workbook

#### Tags:

access: | public

[ Top ]

### method getActiveSheet [line 189]

`PHPExcel_Worksheet getActiveSheet( )`

Get active sheet

#### Tags:

access: | public

[ Top ]

### method getActiveSheetIndex [line 377]

`int getActiveSheetIndex( )`

Get active sheet index

#### Tags:

return: | Active sheet index
access: | public

[ Top ]

### method getAllSheets [line 297]

`PHPExcel_Worksheet[] getAllSheets( )`

Get all sheets

#### Tags:

access: | public

[ Top ]

### method getCellStyleXfByHashCode [line 703]

`PHPExcel_Style|false getCellStyleXfByHashCode( [string $pValue = ''])`

Get cellStyleXf by hash code

#### Tags:

access: | public

#### Parameters:

string | $pValue |

[ Top ]

### method getCellStyleXfByIndex [line 692]

`PHPExcel_Style getCellStyleXfByIndex( [int $pIndex = 0])`

Get cellStyleXf by index

#### Tags:

access: | public

#### Parameters:

int | $pIndex |

[ Top ]

### method getCellStyleXfCollection [line 681]

`PHPExcel_Style[] getCellStyleXfCollection( )`

Get the workbook collection of cellStyleXfs

#### Tags:

access: | public

[ Top ]

### method getCellXfByHashCode [line 600]

`PHPExcel_Style|false getCellXfByHashCode( [string $pValue = ''])`

Get cellXf by hash code

#### Tags:

access: | public

#### Parameters:

string | $pValue |

[ Top ]

### method getCellXfByIndex [line 589]

`PHPExcel_Style getCellXfByIndex( [int $pIndex = 0])`

Get cellXf by index

#### Tags:

access: | public

#### Parameters:

int | $pIndex |

[ Top ]

### method getCellXfCollection [line 578]

`PHPExcel_Style[] getCellXfCollection( )`

Get the workbook collection of cellXfs

#### Tags:

access: | public

[ Top ]

### method getCellXfSupervisor [line 671]

`PHPExcel_Style getCellXfSupervisor( )`

Get the cellXf supervisor

#### Tags:

access: | public

[ Top ]

### method getDefaultStyle [line 616]

`PHPExcel_Style getDefaultStyle( )`

Get default style

#### Tags:

throws: | Exception
access: | public

[ Top ]

### method getIndex [line 328]

`Sheet getIndex( PHPExcel_Worksheet $pSheet)`

Get index for sheet

#### Tags:

return: | index
throws: | Exception
access: | public

#### Parameters:

PHPExcel_Worksheet | $pSheet |

[ Top ]

### method getNamedRange [line 498]

`PHPExcel_NamedRange|null getNamedRange( string $namedRange, [PHPExcel_Worksheet $pSheet = null])`

Get named range

#### Tags:

access: | public

#### Parameters:

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

[ Top ]

### method getNamedRanges [line 470]

`PHPExcel_NamedRange[] getNamedRanges( )`

Get named ranges

#### Tags:

access: | public

[ Top ]

### method getProperties [line 149]

`PHPExcel_DocumentProperties getProperties( )`

Get properties

#### Tags:

access: | public

[ Top ]

### method getSecurity [line 169]

`PHPExcel_DocumentSecurity getSecurity( )`

Get security

#### Tags:

access: | public

[ Top ]

### method getSheet [line 283]

`PHPExcel_Worksheet getSheet( [int $pIndex = 0])`

Get sheet by index

#### Tags:

throws: | Exception
access: | public

#### Parameters:

int | $pIndex | Sheet index

[ Top ]

### method getSheetByName [line 309]

`PHPExcel_Worksheet getSheetByName( [string $pName = ''])`

Get sheet by name

#### Tags:

throws: | Exception
access: | public

#### Parameters:

string | $pName | Sheet name

[ Top ]

### method getSheetCount [line 367]

`int getSheetCount( )`

Get sheet count

#### Tags:

access: | public

[ Top ]

### method getSheetNames [line 421]

`string[] getSheetNames( )`

Get sheet names

#### Tags:

access: | public

[ Top ]

### method getWorksheetIterator [line 541]

`PHPExcel_WorksheetIterator getWorksheetIterator( )`

Get worksheet iterator

#### Tags:

access: | public

[ Top ]

### method removeCellStyleXfByIndex [line 730]

`void removeCellStyleXfByIndex( [int $pIndex = 0])`

Remove cellStyleXf by index

#### Tags:

throws: | Exception
access: | public

#### Parameters:

int | $pIndex |

[ Top ]

### method removeCellXfByIndex [line 641]

`void removeCellXfByIndex( [int $pIndex = 0])`

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

#### Tags:

throws: | Exception
access: | public

#### Parameters:

int | $pIndex | Index to cellXf

[ Top ]

### method removeNamedRange [line 523]

`PHPExcel removeNamedRange( string $namedRange, [PHPExcel_Worksheet $pSheet = null])`

Remove named range

#### Tags:

access: | public

#### Parameters:

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

[ Top ]

### method removeSheetByIndex [line 261]

`void removeSheetByIndex( [int $pIndex = 0])`

Remove sheet by index

#### Tags:

throws: | Exception
access: | public

#### Parameters:

int | $pIndex | Active sheet index

[ Top ]

### method setActiveSheetIndex [line 389]

`PHPExcel_Worksheet setActiveSheetIndex( [int $pIndex = 0])`

Set active sheet index

#### Tags:

throws: | Exception
access: | public

#### Parameters:

int | $pIndex | Active sheet index

[ Top ]

### method setActiveSheetIndexByName [line 406]

`PHPExcel_Worksheet setActiveSheetIndexByName( [string $pValue = ''])`

Set active sheet index by name

#### Tags:

throws: | Exception
access: | public

#### Parameters:

string | $pValue | Sheet title

[ Top ]

### method setIndexByName [line 345]

`New setIndexByName( string $sheetName, int $newIndex)`

Set index for sheet by sheet name.

#### Tags:

return: | sheet index
throws: | Exception
access: | public

#### Parameters:

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

[ Top ]

### method setProperties [line 159]

`void setProperties( PHPExcel_DocumentProperties $pValue)`

Set properties

#### Tags:

access: | public

#### Parameters:

PHPExcel_DocumentProperties | $pValue |

[ Top ]

### method setSecurity [line 179]

`void setSecurity( PHPExcel_DocumentSecurity $pValue)`

Set security

#### Tags:

access: | public

#### Parameters:

PHPExcel_DocumentSecurity | $pValue |

[ Top ]

### method sheetNameExists [line 214]

`boolean sheetNameExists( string $pSheetName)`

Chech if a sheet with a specified name already exists

#### Tags:

access: | public

#### Parameters:

string | $pSheetName | Name of the worksheet to check

[ Top ]

### method __clone [line 565]

`void __clone( )`

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

#### Tags:

access: | public

[ Top ]

Documentation generated on Fri, 12 Oct 2012 00:17:26 +0200 by phpDocumentor 1.4.4