BREAK_NONE
BREAK_NONE = 0
$parent : \PhpOffice\PhpSpreadsheet\Spreadsheet
Parent spreadsheet.
$cellCollection : \PhpOffice\PhpSpreadsheet\Collection\Cells
Collection of cells.
$rowDimensions : array<mixed,\PhpOffice\PhpSpreadsheet\Worksheet\RowDimension>
Collection of row dimensions.
$defaultRowDimension : \PhpOffice\PhpSpreadsheet\Worksheet\RowDimension
Default row dimension.
$columnDimensions : array<mixed,\PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension>
Collection of column dimensions.
$defaultColumnDimension : \PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension
Default column dimension.
$drawingCollection : array<mixed,\PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing>
Collection of drawings.
$chartCollection : array<mixed,\PhpOffice\PhpSpreadsheet\Chart\Chart>
Collection of Chart objects.
$pageSetup : \PhpOffice\PhpSpreadsheet\Worksheet\PageSetup
Page setup.
$pageMargins : \PhpOffice\PhpSpreadsheet\Worksheet\PageMargins
Page margins.
$headerFooter : \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter
Page header/footer.
$sheetView : \PhpOffice\PhpSpreadsheet\Worksheet\SheetView
Sheet view.
$protection : \PhpOffice\PhpSpreadsheet\Worksheet\Protection
Protection.
$styles : array<mixed,\PhpOffice\PhpSpreadsheet\Style\Style>
Collection of styles.
$autoFilter : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter
Autofilter Range and selection.
$comments : array<mixed,\PhpOffice\PhpSpreadsheet\Comment>
Collection of comments.
$tabColor : \PhpOffice\PhpSpreadsheet\Style\Color
Tab color.
__construct(\PhpOffice\PhpSpreadsheet\Spreadsheet $parent = null, string $pTitle = 'Worksheet')
Create a new worksheet.
\PhpOffice\PhpSpreadsheet\Spreadsheet | $parent | |
string | $pTitle |
getCellCollection() : \PhpOffice\PhpSpreadsheet\Collection\Cells
Return the cell collection.
getRowDimensions() : array<mixed,\PhpOffice\PhpSpreadsheet\Worksheet\RowDimension>
Get collection of row dimensions.
getDefaultRowDimension() : \PhpOffice\PhpSpreadsheet\Worksheet\RowDimension
Get default row dimension.
getColumnDimensions() : array<mixed,\PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension>
Get collection of column dimensions.
getDefaultColumnDimension() : \PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension
Get default column dimension.
getDrawingCollection() : array<mixed,\PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing>
Get collection of drawings.
getChartCollection() : array<mixed,\PhpOffice\PhpSpreadsheet\Chart\Chart>
Get collection of charts.
addChart(\PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, null|integer $iChartIndex = null) : \PhpOffice\PhpSpreadsheet\Chart\Chart
Add chart.
\PhpOffice\PhpSpreadsheet\Chart\Chart | $pChart | |
null|integer | $iChartIndex | Index where chart should go (0,1,..., or null for last) |
getChartByIndex(string $index) : \PhpOffice\PhpSpreadsheet\Chart\Chart|false
Get a chart by its index position.
string | $index | Chart index position |
getChartByName(string $chartName) : \PhpOffice\PhpSpreadsheet\Chart\Chart|false
Get a chart by name.
string | $chartName | Chart name |
refreshColumnDimensions() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Refresh column dimensions.
refreshRowDimensions() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Refresh row dimensions.
getParent() : \PhpOffice\PhpSpreadsheet\Spreadsheet
Get parent.
rebindParent(\PhpOffice\PhpSpreadsheet\Spreadsheet $parent) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Re-bind parent.
\PhpOffice\PhpSpreadsheet\Spreadsheet | $parent |
setTitle(string $pValue, boolean $updateFormulaCellReferences = true, boolean $validate = true) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set title.
string | $pValue | String containing the dimension of this worksheet |
boolean | $updateFormulaCellReferences | 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 |
boolean | $validate | False to skip validation of new title. WARNING: This should only be set at parse time (by Readers), where titles can be assumed to be valid. |
setSheetState(string $value) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set sheet state.
string | $value | Sheet state (visible, hidden, veryHidden) |
getPageSetup() : \PhpOffice\PhpSpreadsheet\Worksheet\PageSetup
Get page setup.
setPageSetup(\PhpOffice\PhpSpreadsheet\Worksheet\PageSetup $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set page setup.
\PhpOffice\PhpSpreadsheet\Worksheet\PageSetup | $pValue |
getPageMargins() : \PhpOffice\PhpSpreadsheet\Worksheet\PageMargins
Get page margins.
setPageMargins(\PhpOffice\PhpSpreadsheet\Worksheet\PageMargins $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set page margins.
\PhpOffice\PhpSpreadsheet\Worksheet\PageMargins | $pValue |
getHeaderFooter() : \PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter
Get page header/footer.
setHeaderFooter(\PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set page header/footer.
\PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooter | $pValue |
getSheetView() : \PhpOffice\PhpSpreadsheet\Worksheet\SheetView
Get sheet view.
setSheetView(\PhpOffice\PhpSpreadsheet\Worksheet\SheetView $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set sheet view.
\PhpOffice\PhpSpreadsheet\Worksheet\SheetView | $pValue |
getProtection() : \PhpOffice\PhpSpreadsheet\Worksheet\Protection
Get Protection.
setProtection(\PhpOffice\PhpSpreadsheet\Worksheet\Protection $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set Protection.
\PhpOffice\PhpSpreadsheet\Worksheet\Protection | $pValue |
getHighestDataColumn(string $row = null) : string
Get highest worksheet column that contains data.
string | $row | Return the highest data column for the specified row, or the highest data column of any row if no row number is passed |
Highest column name that contains data
getHighestDataRow(string $column = null) : string
Get highest worksheet row that contains data.
string | $column | Return the highest data row for the specified column, or the highest data row of any column if no column letter is passed |
Highest row number that contains data
setCellValue(string $pCoordinate, mixed $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set a cell value.
string | $pCoordinate | Coordinate of the cell, eg: 'A1' |
mixed | $pValue | Value of the cell |
setCellValueByColumnAndRow(integer $columnIndex, integer $row, mixed $value) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set a cell value by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
mixed | $value | Value of the cell |
setCellValueExplicit(string $pCoordinate, mixed $pValue, string $pDataType) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set a cell value.
string | $pCoordinate | Coordinate of the cell, eg: 'A1' |
mixed | $pValue | Value of the cell |
string | $pDataType | Explicit data type, see DataType::TYPE_* |
setCellValueExplicitByColumnAndRow(integer $columnIndex, integer $row, mixed $value, string $dataType) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set a cell value by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
mixed | $value | Value of the cell |
string | $dataType | Explicit data type, see DataType::TYPE_* |
getCell(string $pCoordinate, boolean $createIfNotExists = true) : null|\PhpOffice\PhpSpreadsheet\Cell\Cell
Get cell at a specific coordinate.
string | $pCoordinate | Coordinate of the cell, eg: 'A1' |
boolean | $createIfNotExists | Flag indicating whether a new cell should be created if it doesn't already exist, or a null should be returned instead |
Cell that was found/created or null
getCellByColumnAndRow(integer $columnIndex, integer $row, boolean $createIfNotExists = true) : null|\PhpOffice\PhpSpreadsheet\Cell\Cell
Get cell at a specific coordinate by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
boolean | $createIfNotExists | Flag indicating whether a new cell should be created if it doesn't already exist, or a null should be returned instead |
Cell that was found/created or null
cellExistsByColumnAndRow(integer $columnIndex, integer $row) : boolean
Cell at a specific coordinate by using numeric cell coordinates exists?
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
getRowDimension(integer $pRow, boolean $create = true) : \PhpOffice\PhpSpreadsheet\Worksheet\RowDimension
Get row dimension at a specific row.
integer | $pRow | Numeric index of the row |
boolean | $create |
getColumnDimension(string $pColumn, boolean $create = true) : \PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension
Get column dimension at a specific column.
string | $pColumn | String index of the column eg: 'A' |
boolean | $create |
getColumnDimensionByColumn(integer $columnIndex) : \PhpOffice\PhpSpreadsheet\Worksheet\ColumnDimension
Get column dimension at a specific column by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
getStyles() : array<mixed,\PhpOffice\PhpSpreadsheet\Style\Style>
Get styles.
getStyle(string $pCellCoordinate) : \PhpOffice\PhpSpreadsheet\Style\Style
Get style for cell.
string | $pCellCoordinate | Cell coordinate (or range) to get style for, eg: 'A1' |
getConditionalStyles(string $pCoordinate) : array<mixed,\PhpOffice\PhpSpreadsheet\Style\Conditional>
Get conditional styles for a cell.
string | $pCoordinate | eg: 'A1' |
removeConditionalStyles(string $pCoordinate) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Removes conditional styles for a cell.
string | $pCoordinate | eg: 'A1' |
setConditionalStyles(string $pCoordinate, $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set conditional styles.
string | $pCoordinate | eg: 'A1' |
$pValue | Conditional[] |
getStyleByColumnAndRow(integer $columnIndex1, integer $row1, null|integer $columnIndex2 = null, null|integer $row2 = null) : \PhpOffice\PhpSpreadsheet\Style\Style
Get style for cell by using numeric cell coordinates.
integer | $columnIndex1 | Numeric column coordinate of the cell |
integer | $row1 | Numeric row coordinate of the cell |
null|integer | $columnIndex2 | Numeric column coordinate of the range cell |
null|integer | $row2 | Numeric row coordinate of the range cell |
duplicateStyle(\PhpOffice\PhpSpreadsheet\Style\Style $pCellStyle, string $pRange) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Duplicate cell style to a range of cells.
Please note that this will overwrite existing cell styles for cells in range!
\PhpOffice\PhpSpreadsheet\Style\Style | $pCellStyle | Cell style to duplicate |
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") |
duplicateConditionalStyle(array<mixed,\PhpOffice\PhpSpreadsheet\Style\Conditional> $pCellStyle, string $pRange = '') : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Duplicate conditional style to a range of cells.
Please note that this will overwrite existing cell styles for cells in range!
array<mixed,\PhpOffice\PhpSpreadsheet\Style\Conditional> | $pCellStyle | Cell style to duplicate |
string | $pRange | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") |
setBreak(string $pCoordinate, integer $pBreak) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set break on a cell.
string | $pCoordinate | Cell coordinate (e.g. A1) |
integer | $pBreak | Break type (type of Worksheet::BREAK_*) |
setBreakByColumnAndRow(integer $columnIndex, integer $row, integer $break) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set break on a cell by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
integer | $break | Break type (type of Worksheet::BREAK_*) |
mergeCells(string $pRange) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set merge on a cell range.
string | $pRange | Cell range (e.g. A1:E1) |
mergeCellsByColumnAndRow(integer $columnIndex1, integer $row1, integer $columnIndex2, integer $row2) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set merge on a cell range by using numeric cell coordinates.
integer | $columnIndex1 | Numeric column coordinate of the first cell |
integer | $row1 | Numeric row coordinate of the first cell |
integer | $columnIndex2 | Numeric column coordinate of the last cell |
integer | $row2 | Numeric row coordinate of the last cell |
unmergeCells(string $pRange) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove merge on a cell range.
string | $pRange | Cell range (e.g. A1:E1) |
unmergeCellsByColumnAndRow(integer $columnIndex1, integer $row1, integer $columnIndex2, integer $row2) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove merge on a cell range by using numeric cell coordinates.
integer | $columnIndex1 | Numeric column coordinate of the first cell |
integer | $row1 | Numeric row coordinate of the first cell |
integer | $columnIndex2 | Numeric column coordinate of the last cell |
integer | $row2 | Numeric row coordinate of the last cell |
setMergeCells(array $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set merge cells array for the entire sheet. Use instead mergeCells() to merge a single cell range.
array | $pValue |
protectCells(string $pRange, string $pPassword, boolean $pAlreadyHashed = false) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set protection on a cell range.
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 |
protectCellsByColumnAndRow(integer $columnIndex1, integer $row1, integer $columnIndex2, integer $row2, string $password, boolean $alreadyHashed = false) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set protection on a cell range by using numeric cell coordinates.
integer | $columnIndex1 | Numeric column coordinate of the first cell |
integer | $row1 | Numeric row coordinate of the first cell |
integer | $columnIndex2 | Numeric column coordinate of the last cell |
integer | $row2 | Numeric row coordinate of the last cell |
string | $password | Password to unlock the protection |
boolean | $alreadyHashed | If the password has already been hashed, set this to true |
unprotectCells(string $pRange) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove protection on a cell range.
string | $pRange | Cell (e.g. A1) or cell range (e.g. A1:E1) |
unprotectCellsByColumnAndRow(integer $columnIndex1, integer $row1, integer $columnIndex2, integer $row2) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove protection on a cell range by using numeric cell coordinates.
integer | $columnIndex1 | Numeric column coordinate of the first cell |
integer | $row1 | Numeric row coordinate of the first cell |
integer | $columnIndex2 | Numeric column coordinate of the last cell |
integer | $row2 | Numeric row coordinate of the last cell |
getAutoFilter() : \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter
Get Autofilter.
setAutoFilter(\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter|string $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set AutoFilter.
\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter|string | $pValue | A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility |
setAutoFilterByColumnAndRow(integer $columnIndex1, integer $row1, integer $columnIndex2, integer $row2) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set Autofilter Range by using numeric cell coordinates.
integer | $columnIndex1 | Numeric column coordinate of the first cell |
integer | $row1 | Numeric row coordinate of the first cell |
integer | $columnIndex2 | Numeric column coordinate of the second cell |
integer | $row2 | Numeric row coordinate of the second cell |
removeAutoFilter() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove autofilter.
freezePane(null|string $cell, null|string $topLeftCell = null) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Freeze Pane.
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 B2 (i.e row 1 and column A)
null|string | $cell | Position of the split |
null|string | $topLeftCell | default position of the right bottom pane |
freezePaneByColumnAndRow(integer $columnIndex, integer $row) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Freeze Pane by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
unfreezePane() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Unfreeze Pane.
insertNewRowBefore(integer $pBefore, integer $pNumRows = 1) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Insert a new row, updating all possible related data.
integer | $pBefore | Insert before this one |
integer | $pNumRows | Number of rows to insert |
insertNewColumnBefore(integer $pBefore, integer $pNumCols = 1) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Insert a new column, updating all possible related data.
integer | $pBefore | Insert before this one, eg: 'A' |
integer | $pNumCols | Number of columns to insert |
insertNewColumnBeforeByIndex(integer $beforeColumnIndex, integer $pNumCols = 1) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Insert a new column, updating all possible related data.
integer | $beforeColumnIndex | Insert before this one (numeric column coordinate of the cell) |
integer | $pNumCols | Number of columns to insert |
removeRow(integer $pRow, integer $pNumRows = 1) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Delete a row, updating all possible related data.
integer | $pRow | Remove starting with this one |
integer | $pNumRows | Number of rows to remove |
removeColumn(string $pColumn, integer $pNumCols = 1) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove a column, updating all possible related data.
string | $pColumn | Remove starting with this one, eg: 'A' |
integer | $pNumCols | Number of columns to remove |
removeColumnByIndex(integer $columnIndex, integer $numColumns = 1) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Remove a column, updating all possible related data.
integer | $columnIndex | Remove starting with this one (numeric column coordinate of the cell) |
integer | $numColumns | Number of columns to remove |
setShowGridlines(boolean $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set show gridlines.
boolean | $pValue | Show gridlines (true/false) |
setPrintGridlines(boolean $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set print gridlines.
boolean | $pValue | Print gridlines (true/false) |
setShowRowColHeaders(boolean $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set show row and column headers.
boolean | $pValue | Show row and column headers (true/false) |
setShowSummaryBelow(boolean $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set show summary below.
boolean | $pValue | Show summary below (true/false) |
setShowSummaryRight(boolean $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set show summary right.
boolean | $pValue | Show summary right (true/false) |
getComments() : array<mixed,\PhpOffice\PhpSpreadsheet\Comment>
Get comments.
setComments(array<mixed,\PhpOffice\PhpSpreadsheet\Comment> $pValue) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set comments array for the entire sheet.
array<mixed,\PhpOffice\PhpSpreadsheet\Comment> | $pValue |
getComment(string $pCellCoordinate) : \PhpOffice\PhpSpreadsheet\Comment
Get comment for cell.
string | $pCellCoordinate | Cell coordinate to get comment for, eg: 'A1' |
getCommentByColumnAndRow(integer $columnIndex, integer $row) : \PhpOffice\PhpSpreadsheet\Comment
Get comment for cell by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
setSelectedCell(string $pCoordinate) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Selected cell.
string | $pCoordinate | Cell (i.e. A1) |
setSelectedCells(string $pCoordinate) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Select a range of cells.
string | $pCoordinate | Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6' |
setSelectedCellByColumnAndRow(integer $columnIndex, integer $row) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Selected cell by using numeric cell coordinates.
integer | $columnIndex | Numeric column coordinate of the cell |
integer | $row | Numeric row coordinate of the cell |
setRightToLeft(boolean $value) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set right-to-left.
boolean | $value | Right-to-left true/false |
fromArray(array $source, mixed $nullValue = null, string $startCell = 'A1', boolean $strictNullComparison = false) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Fill worksheet from values in array.
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 |
rangeToArray(string $pRange, mixed $nullValue = null, boolean $calculateFormulas = true, boolean $formatData = true, boolean $returnCellRef = false) : array
Create array from a range of cells.
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 |
namedRangeToArray(string $pNamedRange, mixed $nullValue = null, boolean $calculateFormulas = true, boolean $formatData = true, boolean $returnCellRef = false) : array
Create array from a range of cells.
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 |
toArray(mixed $nullValue = null, boolean $calculateFormulas = true, boolean $formatData = true, boolean $returnCellRef = false) : array
Create array from worksheet.
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 |
getRowIterator(integer $startRow = 1, integer $endRow = null) : \PhpOffice\PhpSpreadsheet\Worksheet\RowIterator
Get row iterator.
integer | $startRow | The row number at which to start iterating |
integer | $endRow | The row number at which to stop iterating |
getColumnIterator(string $startColumn = 'A', string $endColumn = null) : \PhpOffice\PhpSpreadsheet\Worksheet\ColumnIterator
Get column iterator.
string | $startColumn | The column address at which to start iterating |
string | $endColumn | The column address at which to stop iterating |
garbageCollect() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Run PhpSpreadsheet garbage collector.
extractSheetTitle(string $pRange, boolean $returnRange = false) : mixed
Extract worksheet title from range.
Example: extractSheetTitle("testSheet!A1") ==> 'A1' Example: extractSheetTitle("'testSheet 1'!A1", true) ==> ['testSheet 1', 'A1'];
string | $pRange | Range to extract title from |
boolean | $returnRange | Return range? (see example) |
getHyperlink(string $pCellCoordinate) : \PhpOffice\PhpSpreadsheet\Cell\Hyperlink
Get hyperlink.
string | $pCellCoordinate | Cell coordinate to get hyperlink for, eg: 'A1' |
setHyperlink(string $pCellCoordinate, null|\PhpOffice\PhpSpreadsheet\Cell\Hyperlink $pHyperlink = null) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set hyperlink.
string | $pCellCoordinate | Cell coordinate to insert hyperlink, eg: 'A1' |
null|\PhpOffice\PhpSpreadsheet\Cell\Hyperlink | $pHyperlink |
getHyperlinkCollection() : array<mixed,\PhpOffice\PhpSpreadsheet\Cell\Hyperlink>
Get collection of hyperlinks.
getDataValidation(string $pCellCoordinate) : \PhpOffice\PhpSpreadsheet\Cell\DataValidation
Get data validation.
string | $pCellCoordinate | Cell coordinate to get data validation for, eg: 'A1' |
setDataValidation(string $pCellCoordinate, null|\PhpOffice\PhpSpreadsheet\Cell\DataValidation $pDataValidation = null) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Set data validation.
string | $pCellCoordinate | Cell coordinate to insert data validation, eg: 'A1' |
null|\PhpOffice\PhpSpreadsheet\Cell\DataValidation | $pDataValidation |
getDataValidationCollection() : array<mixed,\PhpOffice\PhpSpreadsheet\Cell\DataValidation>
Get collection of data validations.
getTabColor() : \PhpOffice\PhpSpreadsheet\Style\Color
Get tab color.
resetTabColor() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Reset tab color.
copy() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Copy worksheet (!= clone!).
setCodeName(string $pValue, boolean $validate = true) : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet
Define the code name of the sheet.
string | $pValue | Same rule as Title minus space not allowed (but, like Excel, change silently space to underscore) |
boolean | $validate | False to skip validation of new title. WARNING: This should only be set at parse time (by Readers), where titles can be assumed to be valid. |
createNewCell(string $pCoordinate) : \PhpOffice\PhpSpreadsheet\Cell\Cell
Create a new cell at the specified coordinate.
string | $pCoordinate | Coordinate of the cell |
Cell that was created