PHPExcel_Worksheet

# Class: PHPExcel_Worksheet Source Location: /PHPExcel/Worksheet.php
### Class Overview
PHPExcel_Worksheet #### Author(s): #### Copyright: Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) Implements interfaces: PHPExcel_IComparable | ### Constants BREAK_COLUMN BREAK_NONE BREAK_ROW SHEETSTATE_HIDDEN SHEETSTATE_VERYHIDDEN SHEETSTATE_VISIBLE | ### Methods addChart __construct calculateColumnWidths calculateWorksheetDataDimension calculateWorksheetDimension cellExists cellExistsByColumnAndRow conditionalStylesExists copy dataValidationExists disconnectCells duplicateConditionalStyle duplicateStyle duplicateStyleArray extractSheetTitle freezePane freezePaneByColumnAndRow fromArray garbageCollect getActiveCell getAutoFilter getBreaks getCell getCellByColumnAndRow getCellCacheController getCellCollection getChartByIndex getChartByName getChartCollection getChartCount getChartNames getColumnDimension getColumnDimensionByColumn getColumnDimensions getComment getCommentByColumnAndRow getComments getConditionalStyles getConditionalStylesCollection getDataValidation getDataValidationCollection getDefaultColumnDimension getDefaultRowDimension getDefaultStyle getDrawingCollection getFreezePane getHashCode getHeaderFooter getHighestColumn getHighestDataColumn getHighestDataRow getHighestRow getHighestRowAndColumn getHyperlink getHyperlinkCollection getInvalidCharacters getMergeCells getPageMargins getPageSetup getParent getPrintGridlines getProtectedCells getProtection getRightToLeft getRowDimension getRowDimensions getRowIterator getSelectedCell getSelectedCells getSheetState getSheetView getShowGridlines getShowRowColHeaders getShowSummaryBelow getShowSummaryRight getStyle getStyleByColumnAndRow getStyles getTabColor getTitle hyperlinkExists insertNewColumnBefore insertNewColumnBeforeByIndex insertNewRowBefore isTabColorSet mergeCells mergeCellsByColumnAndRow namedRangeToArray protectCells protectCellsByColumnAndRow rangeToArray rebindParent refreshColumnDimensions refreshRowDimensions removeAutoFilter removeColumn removeColumnByIndex removeConditionalStyles removeRow resetTabColor setAutoFilter setAutoFilterByColumnAndRow setBreak setBreakByColumnAndRow setCellValue setCellValueByColumnAndRow setCellValueExplicit setCellValueExplicitByColumnAndRow setComments setConditionalStyles setDataValidation setDefaultStyle setHeaderFooter setHyperlink setMergeCells setPageMargins setPageSetup setPrintGridlines setProtection setRightToLeft setSelectedCell setSelectedCellByColumnAndRow setSelectedCells setSharedStyle setSheetState setSheetView setShowGridlines setShowRowColHeaders setShowSummaryBelow setShowSummaryRight setTitle shrinkRangeToFit sortCellCollection toArray unfreezePane unmergeCells unmergeCellsByColumnAndRow unprotectCells unprotectCellsByColumnAndRow __clone
### Class Details [line 36] PHPExcel_Worksheet #### Tags:
copyright: | Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
[ Top ] ### Class Methods ### static method extractSheetTitle [line 2568]
`static mixed extractSheetTitle( string $pRange, [bool $returnRange = false])`
Extract worksheet title from range. Example: extractSheetTitle("testSheet!A1") ==> 'A1' Example: extractSheetTitle("'testSheet 1'!A1", true) ==> array('testSheet 1', 'A1'); #### Tags:
access: | public
#### Parameters:
string | $pRange | Range to extract title from
bool | $returnRange | Return range? (see example)
[ Top ] ### static method getInvalidCharacters [line 402]
`static array getInvalidCharacters( )`
Get array of invalid characters for sheet title #### Tags:
access: | public
[ Top ] ### method addChart [line 528]
`PHPExcel_Chart addChart( [PHPExcel_Chart $pChart = null], [int|null $iChartIndex = null])`
Add chart #### Tags:
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Chart | $pChart |
int|null | $iChartIndex | Index where chart should go (0,1,..., or null for last)
[ Top ] ### constructor __construct [line 334]
`PHPExcel_Worksheet __construct( [PHPExcel $pParent = null], [string $pTitle = 'Worksheet'])`
Create a new worksheet #### Tags:
access: | public
#### Parameters:
PHPExcel | $pParent |
string | $pTitle |
[ Top ] ### method calculateColumnWidths [line 677]
`PHPExcel_Worksheet; calculateColumnWidths( [boolean $calculateMergeCells = false])`
Calculate widths for auto-size columns #### Tags:
access: | public
#### Parameters:
boolean | $calculateMergeCells | Calculate merge cell width
[ Top ] ### method calculateWorksheetDataDimension [line 665]
`string calculateWorksheetDataDimension( )`
Calculate worksheet data dimension #### Tags:
return: | String containing the dimension of this worksheet that actually contain data
access: | public
[ Top ] ### method calculateWorksheetDimension [line 654]
`string calculateWorksheetDimension( )`
Calculate worksheet dimension #### Tags:
return: | String containing the dimension of this worksheet
access: | public
[ Top ] ### method cellExists [line 1184]
`boolean cellExists( [string $pCoordinate = 'A1'])`
Cell at a specific coordinate exists? #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pCoordinate | Coordinate of the cell
[ Top ] ### method cellExistsByColumnAndRow [line 1231]
`boolean cellExistsByColumnAndRow( [string $pColumn = 0], [string $pRow = 1])`
Cell at a specific coordinate by using numeric cell coordinates exists? #### Tags:
access: | public
#### Parameters:
string | $pColumn | Numeric column coordinate of the cell
string | $pRow | Numeric row coordinate of the cell
[ Top ] ### method conditionalStylesExists [line 1367]
`boolean conditionalStylesExists( [string $pCoordinate = 'A1'])`
Do conditional styles exist for this cell? #### Tags:
access: | public
#### Parameters:
string | $pCoordinate |
[ Top ] ### method copy [line 2762]
`PHPExcel_Worksheet copy( )`
Copy worksheet (!= clone!) #### Tags:
access: | public
[ Top ] ### method dataValidationExists [line 2678]
`boolean dataValidationExists( [string $pCoordinate = 'A1'])`
Data validation at a specific coordinate exists? #### Tags:
access: | public
#### Parameters:
string | $pCoordinate |
[ Top ] ### method disconnectCells [line 379]
`void disconnectCells( )`
Disconnect all cells from this PHPExcel_Worksheet object, typically so that the worksheet object can be unset #### Tags:
access: | public
[ Top ] ### method duplicateConditionalStyle [line 1513]
`PHPExcel_Worksheet duplicateConditionalStyle( [array $pCellStyle = null], [string $pRange = ''])`
Duplicate conditional style to a range of cells Please note that this will overwrite existing cell styles for cells in range! #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1")
array | $pCellStyle | of PHPExcel_Style_Conditional $pCellStyle Cell style to duplicate
[ Top ] ### method duplicateStyle [line 1449]
`PHPExcel_Worksheet duplicateStyle( [PHPExcel_Style $pCellStyle = null], [string $pRange = ''])`
Duplicate cell style to a range of cells Please note that this will overwrite existing cell styles for cells in range! #### Tags:
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Style | $pCellStyle | Cell style to duplicate
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1")
[ Top ] ### method duplicateStyleArray [line 1573]
`PHPExcel_Worksheet duplicateStyleArray( [array $pStyles = null], [string $pRange = ''], [boolean $pAdvanced = true])`
Duplicate cell style array to a range of cells Please note that this will overwrite existing cell styles for cells in range, if they are in the styles array. For example, if you decide to set a range of cells to font bold, only include font bold in the styles array. #### Tags:
deprecated: |
throws: | Exception
access: | public
#### Parameters:
array | $pStyles | Array containing style information
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1")
boolean | $pAdvanced | Advanced mode for setting borders.
[ Top ] ### method freezePane [line 1912]
`PHPExcel_Worksheet freezePane( [string $pCell = ''])`
Freeze Pane #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pCell | Cell (i.e. A2) Examples: A2 will freeze the rows above cell A2 (i.e row 1) B1 will freeze the columns to the left of cell B1 (i.e column A) B2 will freeze the rows above and to the left of cell A2 (i.e row 1 and column A)
[ Top ] ### method freezePaneByColumnAndRow [line 1933]
`PHPExcel_Worksheet freezePaneByColumnAndRow( [int $pColumn = 0], [int $pRow = 1])`
Freeze Pane by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn | Numeric column coordinate of the cell
int | $pRow | Numeric row coordinate of the cell
[ Top ] ### method fromArray [line 2338]
`PHPExcel_Worksheet fromArray( [array $source = null], [mixed $nullValue = null], [string $startCell = 'A1'], [boolean $strictNullComparison = false])`
Fill worksheet from values in array #### Tags:
throws: | Exception
access: | public
#### Parameters:
array | $source | Source array
mixed | $nullValue | Value in source array that stands for blank cell
string | $startCell | Insert array starting from this cell address as the top left coordinate
boolean | $strictNullComparison | Apply strict comparison when testing for null values in the array
[ Top ] ### method garbageCollect [line 2504]
`PHPExcel_Worksheet garbageCollect( )`
Run PHPExcel garabage collector. #### Tags:
access: | public
[ Top ] ### method getActiveCell [line 2235]
`string getActiveCell( )`
Get active cell #### Tags:
return: | Example: 'A1'
access: | public
[ Top ] ### method getAutoFilter [line 1837]
`PHPExcel_Worksheet_AutoFilter getAutoFilter( )`
Get Autofilter #### Tags:
access: | public
[ Top ] ### method getBreaks [line 1620]
`array[] getBreaks( )`
Get breaks #### Tags:
access: | public
[ Top ] ### method getCell [line 1087]
`PHPExcel_Cell getCell( [string $pCoordinate = 'A1'])`
Get cell at a specific coordinate #### Tags:
return: | Cell that was found
throws: | Exception
access: | public
#### Parameters:
string | $pCoordinate | Coordinate of the cell
[ Top ] ### method getCellByColumnAndRow [line 1157]
`PHPExcel_Cell getCellByColumnAndRow( [string $pColumn = 0], [string $pRow = 1])`
Get cell at a specific coordinate by using numeric cell coordinates #### Tags:
return: | Cell that was found
access: | public
#### Parameters:
string | $pColumn | Numeric column coordinate of the cell
string | $pRow | Numeric row coordinate of the cell
[ Top ] ### method getCellCacheController [line 392]
`PHPExcel_CachedObjectStorage_xxx getCellCacheController( )`
Return the cache controller for the cell collection #### Tags:
access: | public
[ Top ] ### method getCellCollection [line 435]
`PHPExcel_Cell[] getCellCollection( [boolean $pSorted = true])`
Get collection of cells #### Tags:
access: | public
#### Parameters:
boolean | $pSorted | Also sort the cell collection?
[ Top ] ### method getChartByIndex [line 559]
`false|PHPExcel_Chart getChartByIndex( [string $index = null])`
Get a chart by its index position #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $index | Chart index position
[ Top ] ### method getChartByName [line 597]
`false|PHPExcel_Chart getChartByName( [string $chartName = ''])`
Get a chart by name #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $chartName | Chart name
[ Top ] ### method getChartCollection [line 515]
`PHPExcel_Chart[] getChartCollection( )`
Get collection of charts #### Tags:
access: | public
[ Top ] ### method getChartCount [line 547]
`int getChartCount( )`
Return the count of charts on this worksheet #### Tags:
return: | The number of charts
throws: | Exception
access: | public
[ Top ] ### method getChartNames [line 581]
`string[] getChartNames( )`
Return an array of the names of charts on this worksheet #### Tags:
return: | The names of charts
throws: | Exception
access: | public
[ Top ] ### method getColumnDimension [line 1262]
`PHPExcel_Worksheet_ColumnDimension getColumnDimension( [string $pColumn = 'A'])`
Get column dimension at a specific column #### Tags:
access: | public
#### Parameters:
string | $pColumn | String index of the column
[ Top ] ### method getColumnDimensionByColumn [line 1283]
`PHPExcel_Worksheet_ColumnDimension getColumnDimensionByColumn( [string $pColumn = 0])`
Get column dimension at a specific column by using numeric cell coordinates #### Tags:
access: | public
#### Parameters:
string | $pColumn | Numeric column coordinate of the cell
[ Top ] ### method getColumnDimensions [line 485]
`PHPExcel_Worksheet_ColumnDimension[] getColumnDimensions( )`
Get collection of column dimensions #### Tags:
access: | public
[ Top ] ### method getComment [line 2183]
`PHPExcel_Comment getComment( [string $pCellCoordinate = 'A1'])`
Get comment for cell #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pCellCoordinate | Cell coordinate to get comment for
[ Top ] ### method getCommentByColumnAndRow [line 2214]
`PHPExcel_Comment getCommentByColumnAndRow( [int $pColumn = 0], [int $pRow = 1])`
Get comment for cell by using numeric cell coordinates #### Tags:
access: | public
#### Parameters:
int | $pColumn | Numeric column coordinate of the cell
int | $pRow | Numeric row coordinate of the cell
[ Top ] ### method getComments [line 2158]
`PHPExcel_Comment[] getComments( )`
Get comments #### Tags:
access: | public
[ Top ] ### method getConditionalStyles [line 1353]
`PHPExcel_Style_Conditional[] getConditionalStyles( [string $pCoordinate = 'A1'])`
Get conditional styles for a cell #### Tags:
access: | public
#### Parameters:
string | $pCoordinate |
[ Top ] ### method getConditionalStylesCollection [line 1392]
`array getConditionalStylesCollection( )`
Get collection of conditional styles #### Tags:
access: | public
[ Top ] ### method getDataValidation [line 2643]
`void getDataValidation( [string $pCellCoordinate = 'A1'])`
Get data validation #### Tags:
access: | public
#### Parameters:
string | $pCellCoordinate | Cell coordinate to get data validation for
[ Top ] ### method getDataValidationCollection [line 2688]
`PHPExcel_Cell_DataValidation[] getDataValidationCollection( )`
Get collection of data validations #### Tags:
access: | public
[ Top ] ### method getDefaultColumnDimension [line 495]
`PHPExcel_Worksheet_ColumnDimension getDefaultColumnDimension( )`
Get default column dimension #### Tags:
access: | public
[ Top ] ### method getDefaultRowDimension [line 475]
`PHPExcel_Worksheet_RowDimension getDefaultRowDimension( )`
Get default row dimension #### Tags:
access: | public
[ Top ] ### method getDefaultStyle [line 1305]
`PHPExcel_Style getDefaultStyle( )`
Get default style of workbork. #### Tags:
deprecated: |
throws: | Exception
access: | public
[ Top ] ### method getDrawingCollection [line 505]
`PHPExcel_Worksheet_BaseDrawing[] getDrawingCollection( )`
Get collection of drawings #### Tags:
access: | public
[ Top ] ### method getFreezePane [line 1895]
`string getFreezePane( )`
Get Freeze Pane #### Tags:
access: | public
[ Top ] ### method getHashCode [line 2546]
`string getHashCode( )`
Get hash code #### Tags:
return: | Hash code
access: | public
[ Top ] ### method getHeaderFooter [line 906]
`PHPExcel_Worksheet_HeaderFooter getHeaderFooter( )`
Get page header/footer #### Tags:
access: | public
[ Top ] ### method getHighestColumn [line 974]
`string getHighestColumn( )`
Get highest worksheet column #### Tags:
return: | Highest column name
access: | public
[ Top ] ### method getHighestDataColumn [line 984]
`string getHighestDataColumn( )`
Get highest worksheet column that contains data #### Tags:
return: | Highest column name that contains data
access: | public
[ Top ] ### method getHighestDataRow [line 1004]
`string getHighestDataRow( )`
Get highest worksheet row that contains data #### Tags:
return: | Highest row number that contains data
access: | public
[ Top ] ### method getHighestRow [line 994]
`int getHighestRow( )`
Get highest worksheet row #### Tags:
return: | Highest row number
access: | public
[ Top ] ### method getHighestRowAndColumn [line 1014]
`array getHighestRowAndColumn( )`
Get highest worksheet column and highest row that have cell records #### Tags:
return: | Highest column name and highest row number
access: | public
[ Top ] ### method getHyperlink [line 2588]
`void getHyperlink( [string $pCellCoordinate = 'A1'])`
Get hyperlink #### Tags:
access: | public
#### Parameters:
string | $pCellCoordinate | Cell coordinate to get hyperlink for
[ Top ] ### method getHyperlinkCollection [line 2633]
`PHPExcel_Cell_Hyperlink[] getHyperlinkCollection( )`
Get collection of hyperlinks #### Tags:
access: | public
[ Top ] ### method getMergeCells [line 1726]
`array[] getMergeCells( )`
Get merge cells array. #### Tags:
access: | public
[ Top ] ### method getPageMargins [line 884]
`PHPExcel_Worksheet_PageMargins getPageMargins( )`
Get page margins #### Tags:
access: | public
[ Top ] ### method getPageSetup [line 862]
`PHPExcel_Worksheet_PageSetup getPageSetup( )`
Get page setup #### Tags:
access: | public
[ Top ] ### method getParent [line 738]
`PHPExcel getParent( )`
Get parent #### Tags:
access: | public
[ Top ] ### method getPrintGridlines [line 2078]
`boolean getPrintGridlines( )`
Print gridlines? #### Tags:
access: | public
[ Top ] ### method getProtectedCells [line 1827]
`array[] getProtectedCells( )`
Get protected cells #### Tags:
access: | public
[ Top ] ### method getProtection [line 950]
`PHPExcel_Worksheet_Protection getProtection( )`
Get Protection #### Tags:
access: | public
[ Top ] ### method getRightToLeft [line 2313]
`boolean getRightToLeft( )`
Get right-to-left #### Tags:
access: | public
[ Top ] ### method getRowDimension [line 1242]
`PHPExcel_Worksheet_RowDimension getRowDimension( [int $pRow = 1])`
Get row dimension at a specific row #### Tags:
access: | public
#### Parameters:
int | $pRow | Numeric index of the row
[ Top ] ### method getRowDimensions [line 465]
`PHPExcel_Worksheet_RowDimension[] getRowDimensions( )`
Get collection of row dimensions #### Tags:
access: | public
[ Top ] ### method getRowIterator [line 2495]
`PHPExcel_Worksheet_RowIterator getRowIterator( [integer $startRow = 1])`
Get row iterator #### Tags:
access: | public
#### Parameters:
integer | $startRow | The row number at which to start iterating
[ Top ] ### method getSelectedCell [line 2225]
`string getSelectedCell( )`
Get selected cell #### Tags:
deprecated: |
access: | public
[ Top ] ### method getSelectedCells [line 2245]
`string getSelectedCells( )`
Get selected cells #### Tags:
access: | public
[ Top ] ### method getSheetState [line 842]
`string getSheetState( )`
Get sheet state #### Tags:
return: | Sheet state (visible, hidden, veryHidden)
access: | public
[ Top ] ### method getSheetView [line 928]
`PHPExcel_Worksheet_HeaderFooter getSheetView( )`
Get sheet view #### Tags:
access: | public
[ Top ] ### method getShowGridlines [line 2058]
`boolean getShowGridlines( )`
Show gridlines? #### Tags:
access: | public
[ Top ] ### method getShowRowColHeaders [line 2098]
`boolean getShowRowColHeaders( )`
Show row and column headers? #### Tags:
access: | public
[ Top ] ### method getShowSummaryBelow [line 2118]
`boolean getShowSummaryBelow( )`
Show summary below? (Row/Column outlining) #### Tags:
access: | public
[ Top ] ### method getShowSummaryRight [line 2138]
`boolean getShowSummaryRight( )`
Show summary right? (Row/Column outlining) #### Tags:
access: | public
[ Top ] ### method getStyle [line 1336]
`PHPExcel_Style getStyle( [string $pCellCoordinate = 'A1'])`
Get style for cell #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pCellCoordinate | Cell coordinate to get style for
[ Top ] ### method getStyleByColumnAndRow [line 1417]
`PHPExcel_Style getStyleByColumnAndRow( [int $pColumn = 0], [int $pRow = 1])`
Get style for cell by using numeric cell coordinates #### Tags:
access: | public
#### Parameters:
int | $pColumn | Numeric column coordinate of the cell
int | $pRow | Numeric row coordinate of the cell
[ Top ] ### method getStyles [line 1293]
`PHPExcel_Style[] getStyles( )`
Get styles #### Tags:
access: | public
[ Top ] ### method getTabColor [line 2726]
`PHPExcel_Style_Color getTabColor( )`
Get tab color #### Tags:
access: | public
[ Top ] ### method getTitle [line 767]
`string getTitle( )`
Get title #### Tags:
access: | public
[ Top ] ### method hyperlinkExists [line 2623]
`boolean hyperlinkExists( [string $pCoordinate = 'A1'])`
Hyperlink at a specific coordinate exists? #### Tags:
access: | public
#### Parameters:
string | $pCoordinate |
[ Top ] ### method insertNewColumnBefore [line 1974]
`PHPExcel_Worksheet insertNewColumnBefore( [int $pBefore = 'A'], [int $pNumCols = 1])`
Insert a new column, updating all possible related data #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pBefore | Insert before this one
int | $pNumCols | Number of columns to insert
[ Top ] ### method insertNewColumnBeforeByIndex [line 1992]
`PHPExcel_Worksheet insertNewColumnBeforeByIndex( [int $pBefore = 0], [int $pNumCols = 1])`
Insert a new column, updating all possible related data #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pBefore | Insert before this one (numeric column coordinate of the cell)
int | $pNumCols | Number of columns to insert
[ Top ] ### method insertNewRowBefore [line 1956]
`PHPExcel_Worksheet insertNewRowBefore( [int $pBefore = 1], [int $pNumRows = 1])`
Insert a new row, updating all possible related data #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pBefore | Insert before this one
int | $pNumRows | Number of rows to insert
[ Top ] ### method isTabColorSet [line 2752]
`boolean isTabColorSet( )`
Tab color set? #### Tags:
access: | public
[ Top ] ### method mergeCells [line 1632]
`PHPExcel_Worksheet mergeCells( [string $pRange = 'A1:A1'])`
Set merge on a cell range #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pRange | Cell range (e.g. A1:E1)
[ Top ] ### method mergeCellsByColumnAndRow [line 1674]
`PHPExcel_Worksheet mergeCellsByColumnAndRow( [int $pColumn1 = 0], [int $pRow1 = 1], [int $pColumn2 = 0], [int $pRow2 = 1])`
Set merge on a cell range by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn1 | Numeric column coordinate of the first cell
int | $pRow1 | Numeric row coordinate of the first cell
int | $pColumn2 | Numeric column coordinate of the last cell
int | $pRow2 | Numeric row coordinate of the last cell
[ Top ] ### method namedRangeToArray [line 2453]
`array namedRangeToArray( [string $pNamedRange = ''], [mixed $nullValue = null], [boolean $calculateFormulas = true], [boolean $formatData = true], [boolean $returnCellRef = false])`
Create array from a range of cells #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pNamedRange | Name of the Named Range
mixed | $nullValue | Value returned in the array entry if a cell doesn't exist
boolean | $calculateFormulas | Should formulas be calculated?
boolean | $formatData | Should formatting be applied to cell values?
boolean | $returnCellRef | False - Return a simple array of rows and columns indexed by number counting from zero True - Return rows and columns indexed by their actual row and column IDs
[ Top ] ### method protectCells [line 1753]
`PHPExcel_Worksheet protectCells( [string $pRange = 'A1'], [string $pPassword = ''], [boolean $pAlreadyHashed = false])`
Set protection on a cell range #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pRange | Cell (e.g. A1) or cell range (e.g. A1:E1)
string | $pPassword | Password to unlock the protection
boolean | $pAlreadyHashed | If the password has already been hashed, set this to true
[ Top ] ### method protectCellsByColumnAndRow [line 1778]
`PHPExcel_Worksheet protectCellsByColumnAndRow( [int $pColumn1 = 0], [int $pRow1 = 1], [int $pColumn2 = 0], [int $pRow2 = 1], [string $pPassword = ''], [boolean $pAlreadyHashed = false])`
Set protection on a cell range by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn1 | Numeric column coordinate of the first cell
int | $pRow1 | Numeric row coordinate of the first cell
int | $pColumn2 | Numeric column coordinate of the last cell
int | $pRow2 | Numeric row coordinate of the last cell
string | $pPassword | Password to unlock the protection
boolean | $pAlreadyHashed | If the password has already been hashed, set this to true
[ Top ] ### method rangeToArray [line 2384]
`array rangeToArray( [string $pRange = 'A1'], [mixed $nullValue = null], [boolean $calculateFormulas = true], [boolean $formatData = true], [boolean $returnCellRef = false])`
Create array from a range of cells #### Tags:
access: | public
#### Parameters:
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1")
mixed | $nullValue | Value returned in the array entry if a cell doesn't exist
boolean | $calculateFormulas | Should formulas be calculated?
boolean | $formatData | Should formatting be applied to cell values?
boolean | $returnCellRef | False - Return a simple array of rows and columns indexed by number counting from zero True - Return rows and columns indexed by their actual row and column IDs
[ Top ] ### method rebindParent [line 748]
`PHPExcel_Worksheet rebindParent( PHPExcel $parent)`
Re-bind parent #### Tags:
access: | public
#### Parameters:
PHPExcel | $parent |
[ Top ] ### method refreshColumnDimensions [line 616]
`PHPExcel_Worksheet refreshColumnDimensions( )`
Refresh column dimensions #### Tags:
access: | public
[ Top ] ### method refreshRowDimensions [line 635]
`PHPExcel_Worksheet refreshRowDimensions( )`
Refresh row dimensions #### Tags:
access: | public
[ Top ] ### method removeAutoFilter [line 1884]
`PHPExcel_Worksheet removeAutoFilter( )`
Remove autofilter #### Tags:
access: | public
[ Top ] ### method removeColumn [line 2026]
`PHPExcel_Worksheet removeColumn( [int $pColumn = 'A'], [int $pNumCols = 1])`
Remove a column, updating all possible related data #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn | Remove starting with this one
int | $pNumCols | Number of columns to remove
[ Top ] ### method removeColumnByIndex [line 2045]
`PHPExcel_Worksheet removeColumnByIndex( [int $pColumn = 0], [int $pNumCols = 1])`
Remove a column, updating all possible related data #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn | Remove starting with this one (numeric column coordinate of the cell)
int | $pNumCols | Number of columns to remove
[ Top ] ### method removeConditionalStyles [line 1381]
`PHPExcel_Worksheet removeConditionalStyles( [string $pCoordinate = 'A1'])`
Removes conditional styles for a cell #### Tags:
access: | public
#### Parameters:
string | $pCoordinate |
[ Top ] ### method removeRow [line 2008]
`PHPExcel_Worksheet removeRow( [int $pRow = 1], [int $pNumRows = 1])`
Delete a row, updating all possible related data #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pRow | Remove starting with this one
int | $pNumRows | Number of rows to remove
[ Top ] ### method resetTabColor [line 2739]
`PHPExcel_Worksheet resetTabColor( )`
Reset tab color #### Tags:
access: | public
[ Top ] ### method setAutoFilter [line 1850]
`PHPExcel_Worksheet setAutoFilter( PHPExcel_Worksheet_AutoFilter|string $pValue)`
Set AutoFilter #### Tags:
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Worksheet_AutoFilter|string | $pValue | A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility
[ Top ] ### method setAutoFilterByColumnAndRow [line 1870]
`PHPExcel_Worksheet setAutoFilterByColumnAndRow( [int $pColumn1 = 0], [int $pRow1 = 1], [int $pColumn2 = 0], [int $pRow2 = 1])`
Set Autofilter Range by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn1 | Numeric column coordinate of the first cell
int | $pRow1 | Numeric row coordinate of the first cell
int | $pColumn2 | Numeric column coordinate of the second cell
int | $pRow2 | Numeric row coordinate of the second cell
[ Top ] ### method setBreak [line 1587]
`PHPExcel_Worksheet setBreak( [string $pCell = 'A1'], [int $pBreak = PHPExcel_Worksheet::BREAK_NONE])`
Set break on a cell #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pCell | Cell coordinate (e.g. A1)
int | $pBreak | Break type (type of PHPExcel_Worksheet::BREAK_*)
[ Top ] ### method setBreakByColumnAndRow [line 1610]
`PHPExcel_Worksheet setBreakByColumnAndRow( [integer $pColumn = 0], [integer $pRow = 1], [integer $pBreak = PHPExcel_Worksheet::BREAK_NONE])`
Set break on a cell by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
integer | $pColumn | Numeric column coordinate of the cell
integer | $pRow | Numeric row coordinate of the cell
integer | $pBreak | Break type (type of PHPExcel_Worksheet::BREAK_*)
[ Top ] ### method setCellValue [line 1027]
`PHPExcel_Worksheet|PHPExcel_Cell setCellValue( [string $pCoordinate = 'A1'], [mixed $pValue = null], [bool $returnCell = false])`
Set a cell value #### Tags:
return: | Depending on the last parameter being specified
access: | public
#### Parameters:
string | $pCoordinate | Coordinate of the cell
mixed | $pValue | Value of the cell
bool | $returnCell | Return the worksheet (false, default) or the cell (true)
[ Top ] ### method setCellValueByColumnAndRow [line 1042]
`PHPExcel_Worksheet|PHPExcel_Cell setCellValueByColumnAndRow( [string $pColumn = 0], [string $pRow = 1], [mixed $pValue = null], [bool $returnCell = false])`
Set a cell value by using numeric cell coordinates #### Tags:
return: | Depending on the last parameter being specified
access: | public
#### Parameters:
string | $pColumn | Numeric column coordinate of the cell
string | $pRow | Numeric row coordinate of the cell
mixed | $pValue | Value of the cell
bool | $returnCell | Return the worksheet (false, default) or the cell (true)
[ Top ] ### method setCellValueExplicit [line 1057]
`PHPExcel_Worksheet|PHPExcel_Cell setCellValueExplicit( [string $pCoordinate = 'A1'], [mixed $pValue = null], [string $pDataType = PHPExcel_Cell_DataType::TYPE_STRING], [bool $returnCell = false])`
Set a cell value #### Tags:
return: | Depending on the last parameter being specified
access: | public
#### Parameters:
string | $pCoordinate | Coordinate of the cell
mixed | $pValue | Value of the cell
string | $pDataType | Explicit data type
bool | $returnCell | Return the worksheet (false, default) or the cell (true)
[ Top ] ### method setCellValueExplicitByColumnAndRow [line 1074]
`PHPExcel_Worksheet|PHPExcel_Cell setCellValueExplicitByColumnAndRow( [string $pColumn = 0], [string $pRow = 1], [mixed $pValue = null], [string $pDataType = PHPExcel_Cell_DataType::TYPE_STRING], [bool $returnCell = false])`
Set a cell value by using numeric cell coordinates #### Tags:
return: | Depending on the last parameter being specified
access: | public
#### Parameters:
string | $pColumn | Numeric column coordinate of the cell
string | $pRow | Numeric row coordinate of the cell
mixed | $pValue | Value of the cell
string | $pDataType | Explicit data type
bool | $returnCell | Return the worksheet (false, default) or the cell (true)
[ Top ] ### method setComments [line 2169]
`PHPExcel_Worksheet setComments( [array $pValue = array()])`
Set comments array for the entire sheet. #### Tags:
access: | public
#### Parameters:
array | $pValue | of PHPExcel_Comment
[ Top ] ### method setConditionalStyles [line 1404]
`PHPExcel_Worksheet setConditionalStyles( [$pCoordinate $pCoordinate = 'A1'], $pValue $pValue)`
Set conditional styles #### Tags:
access: | public
#### Parameters:
$pCoordinate | $pCoordinate | string E.g. 'A1'
$pValue | $pValue | PHPExcel_Style_Conditional[]
[ Top ] ### method setDataValidation [line 2662]
`PHPExcel_Worksheet setDataValidation( [string $pCellCoordinate = 'A1'], [PHPExcel_Cell_DataValidation $pDataValidation = null])`
Set data validation #### Tags:
access: | public
#### Parameters:
string | $pCellCoordinate | Cell coordinate to insert data validation
PHPExcel_Cell_DataValidation | $pDataValidation |
[ Top ] ### method setDefaultStyle [line 1318]
`PHPExcel_Worksheet setDefaultStyle( PHPExcel_Style $pValue)`
Set default style - should only be used by PHPExcel_IReader implementations! #### Tags:
deprecated: |
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Style | $pValue |
[ Top ] ### method setHeaderFooter [line 917]
`PHPExcel_Worksheet setHeaderFooter( PHPExcel_Worksheet_HeaderFooter $pValue)`
Set page header/footer #### Tags:
access: | public
#### Parameters:
PHPExcel_Worksheet_HeaderFooter | $pValue |
[ Top ] ### method setHyperlink [line 2607]
`PHPExcel_Worksheet setHyperlink( [string $pCellCoordinate = 'A1'], [PHPExcel_Cell_Hyperlink $pHyperlink = null])`
Set hyperlnk #### Tags:
access: | public
#### Parameters:
string | $pCellCoordinate | Cell coordinate to insert hyperlink
PHPExcel_Cell_Hyperlink | $pHyperlink |
[ Top ] ### method setMergeCells [line 1737]
`void setMergeCells( [array $pValue = array()])`
Set merge cells array for the entire sheet. Use instead mergeCells() to merge a single cell range. #### Tags:
access: | public
#### Parameters:
array | $pValue |
[ Top ] ### method setPageMargins [line 895]
`PHPExcel_Worksheet setPageMargins( PHPExcel_Worksheet_PageMargins $pValue)`
Set page margins #### Tags:
access: | public
#### Parameters:
PHPExcel_Worksheet_PageMargins | $pValue |
[ Top ] ### method setPageSetup [line 873]
`PHPExcel_Worksheet setPageSetup( PHPExcel_Worksheet_PageSetup $pValue)`
Set page setup #### Tags:
access: | public
#### Parameters:
PHPExcel_Worksheet_PageSetup | $pValue |
[ Top ] ### method setPrintGridlines [line 2088]
`PHPExcel_Worksheet setPrintGridlines( [boolean $pValue = false])`
Set print gridlines #### Tags:
access: | public
#### Parameters:
boolean | $pValue | Print gridlines (true/false)
[ Top ] ### method setProtection [line 961]
`PHPExcel_Worksheet setProtection( PHPExcel_Worksheet_Protection $pValue)`
Set Protection #### Tags:
access: | public
#### Parameters:
PHPExcel_Worksheet_Protection | $pValue |
[ Top ] ### method setRightToLeft [line 2323]
`PHPExcel_Worksheet setRightToLeft( [boolean $value = false])`
Set right-to-left #### Tags:
access: | public
#### Parameters:
boolean | $value | Right-to-left true/false
[ Top ] ### method setSelectedCell [line 2256]
`PHPExcel_Worksheet setSelectedCell( [string $pCoordinate = 'A1'])`
Selected cell #### Tags:
access: | public
#### Parameters:
string | $pCoordinate | Cell (i.e. A1)
[ Top ] ### method setSelectedCellByColumnAndRow [line 2303]
`PHPExcel_Worksheet setSelectedCellByColumnAndRow( [int $pColumn = 0], [int $pRow = 1])`
Selected cell by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn | Numeric column coordinate of the cell
int | $pRow | Numeric row coordinate of the cell
[ Top ] ### method setSelectedCells [line 2268]
`PHPExcel_Worksheet setSelectedCells( [string $pCoordinate = 'A1'])`
Select a range of cells. #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pCoordinate | Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6'
[ Top ] ### method setSharedStyle [line 1433]
`PHPExcel_Worksheet setSharedStyle( [PHPExcel_Style $pSharedCellStyle = null], [string $pRange = ''])`
Set shared cell style to a range of cells Please note that this will overwrite existing cell styles for cells in range! #### Tags:
deprecated: |
throws: | Exception
access: | public
#### Parameters:
PHPExcel_Style | $pSharedCellStyle | Cell style to share
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1")
[ Top ] ### method setSheetState [line 852]
`PHPExcel_Worksheet setSheetState( [string $value = PHPExcel_Worksheet::SHEETSTATE_VISIBLE])`
Set sheet state #### Tags:
access: | public
#### Parameters:
string | $value | Sheet state (visible, hidden, veryHidden)
[ Top ] ### method setSheetView [line 939]
`PHPExcel_Worksheet setSheetView( PHPExcel_Worksheet_SheetView $pValue)`
Set sheet view #### Tags:
access: | public
#### Parameters:
PHPExcel_Worksheet_SheetView | $pValue |
[ Top ] ### method setShowGridlines [line 2068]
`PHPExcel_Worksheet setShowGridlines( [boolean $pValue = false])`
Set show gridlines #### Tags:
access: | public
#### Parameters:
boolean | $pValue | Show gridlines (true/false)
[ Top ] ### method setShowRowColHeaders [line 2108]
`PHPExcel_Worksheet setShowRowColHeaders( [boolean $pValue = false])`
Set show row and column headers #### Tags:
access: | public
#### Parameters:
boolean | $pValue | Show row and column headers (true/false)
[ Top ] ### method setShowSummaryBelow [line 2128]
`PHPExcel_Worksheet setShowSummaryBelow( [boolean $pValue = true])`
Set show summary below #### Tags:
access: | public
#### Parameters:
boolean | $pValue | Show summary below (true/false)
[ Top ] ### method setShowSummaryRight [line 2148]
`PHPExcel_Worksheet setShowSummaryRight( [boolean $pValue = true])`
Set show summary right #### Tags:
access: | public
#### Parameters:
boolean | $pValue | Show summary right (true/false)
[ Top ] ### method setTitle [line 783]
`PHPExcel_Worksheet setTitle( [string $pValue = 'Worksheet'], [string $updateFormulaCellReferences = true])`
Set title #### Tags:
access: | public
#### Parameters:
string | $pValue | String containing the dimension of this worksheet
string | $updateFormulaCellReferences | boolean Flag indicating whether cell references in formulae should be updated to reflect the new sheet name. This should be left as the default true, unless you are certain that no formula cells on any worksheet contain references to this worksheet
[ Top ] ### method shrinkRangeToFit [line 2699]
`string shrinkRangeToFit( string $range)`
Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet #### Tags:
return: | Adjusted range value
access: | public
#### Parameters:
string | $range |
[ Top ] ### method sortCellCollection [line 452]
`PHPExcel_Worksheet sortCellCollection( )`
Sort collection of cells #### Tags:
access: | public
[ Top ] ### method toArray [line 2477]
`array toArray( [mixed $nullValue = null], [boolean $calculateFormulas = true], [boolean $formatData = true], [boolean $returnCellRef = false])`
Create array from worksheet #### Tags:
access: | public
#### Parameters:
mixed | $nullValue | Value returned in the array entry if a cell doesn't exist
boolean | $calculateFormulas | Should formulas be calculated?
boolean | $formatData | Should formatting be applied to cell values?
boolean | $returnCellRef | False - Return a simple array of rows and columns indexed by number counting from zero True - Return rows and columns indexed by their actual row and column IDs
[ Top ] ### method unfreezePane [line 1943]
`PHPExcel_Worksheet unfreezePane( )`
Unfreeze Pane #### Tags:
access: | public
[ Top ] ### method unmergeCells [line 1687]
`PHPExcel_Worksheet unmergeCells( [string $pRange = 'A1:A1'])`
Remove merge on a cell range #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pRange | Cell range (e.g. A1:E1)
[ Top ] ### method unmergeCellsByColumnAndRow [line 1715]
`PHPExcel_Worksheet unmergeCellsByColumnAndRow( [int $pColumn1 = 0], [int $pRow1 = 1], [int $pColumn2 = 0], [int $pRow2 = 1])`
Remove merge on a cell range by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn1 | Numeric column coordinate of the first cell
int | $pRow1 | Numeric row coordinate of the first cell
int | $pColumn2 | Numeric column coordinate of the last cell
int | $pRow2 | Numeric row coordinate of the last cell
[ Top ] ### method unprotectCells [line 1791]
`PHPExcel_Worksheet unprotectCells( [string $pRange = 'A1'])`
Remove protection on a cell range #### Tags:
throws: | Exception
access: | public
#### Parameters:
string | $pRange | Cell (e.g. A1) or cell range (e.g. A1:E1)
[ Top ] ### method unprotectCellsByColumnAndRow [line 1816]
`PHPExcel_Worksheet unprotectCellsByColumnAndRow( [int $pColumn1 = 0], [int $pRow1 = 1], [int $pColumn2 = 0], [int $pRow2 = 1], [string $pPassword = ''], [boolean $pAlreadyHashed = false])`
Remove protection on a cell range by using numeric cell coordinates #### Tags:
throws: | Exception
access: | public
#### Parameters:
int | $pColumn1 | Numeric column coordinate of the first cell
int | $pRow1 | Numeric row coordinate of the first cell
int | $pColumn2 | Numeric column coordinate of the last cell
int | $pRow2 | Numeric row coordinate of the last cell
string | $pPassword | Password to unlock the protection
boolean | $pAlreadyHashed | If the password has already been hashed, set this to true
[ Top ] ### method __clone [line 2771]
`void __clone( )`
Implement PHP __clone to create a deep clone, not just a shallow copy. #### Tags:
access: | public
[ Top ] ### Class Constants #### BREAK_COLUMN = 2 [line 41] [ Top ] #### BREAK_NONE = 0 [line 39] [ Top ] #### BREAK_ROW = 1 [line 40] [ Top ] #### SHEETSTATE_HIDDEN = 'hidden' [line 45] [ Top ] #### SHEETSTATE_VERYHIDDEN = 'veryHidden' [line 46] [ Top ] #### SHEETSTATE_VISIBLE = 'visible' [line 44] [ Top ] Documentation generated on Fri, 12 Oct 2012 00:26:03 +0200 by phpDocumentor 1.4.4