Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
|
Public Member Functions | |
__construct (?Spreadsheet $parent=null, string $title='Worksheet') | |
Create a new worksheet. | |
__destruct () | |
Code to execute when this worksheet is unset(). | |
__clone () | |
Implement PHP __clone to create a deep clone, not just a shallow copy. | |
__wakeup () | |
addChart (Chart $chart) | |
addTable (Table $table) | |
Add Table. | |
applyStylesFromArray (string $coordinate, array $styleArray) | |
calculateArrays (bool $preCalculateFormulas=true) | |
calculateColumnWidths () | |
Calculate widths for auto-size columns. | |
calculateWorksheetDataDimension () | |
Calculate worksheet data dimension. | |
calculateWorksheetDimension () | |
Calculate worksheet dimension. | |
cellExists (CellAddress|string|array $coordinate) | |
Does the cell at a specific coordinate exist? | |
columnDimensionExists (string $column) | |
conditionalStylesExists (string $coordinate) | |
Do conditional styles exist for this cell? | |
copy () | |
Copy worksheet (!= clone!). | |
copyCells (string $fromCell, string $toCells, bool $copyStyle=true) | |
Copy cells, adjusting relative cell references in formulas. | |
createNewCell (string $coordinate) | |
Create a new cell at the specified coordinate. | |
dataValidationExists (string $coordinate) | |
Data validation at a specific coordinate exists? | |
disconnectCells () | |
Disconnect all cells from this Worksheet object, typically so that the worksheet object can be unset. | |
duplicateConditionalStyle (array $styles, string $range='') | |
Duplicate conditional style to a range of cells. | |
duplicateStyle (Style $style, string $range) | |
Duplicate cell style to a range of cells. | |
freezePane (null|CellAddress|string|array $coordinate, null|CellAddress|string|array $topLeftCell=null, bool $frozenSplit=false) | |
Freeze Pane. | |
fromArray (array $source, mixed $nullValue=null, string $startCell='A1', bool $strictNullComparison=false) | |
Fill worksheet from values in array. | |
garbageCollect () | |
Run PhpSpreadsheet garbage collector. | |
getActiveCell () | |
Get active cell. | |
getActivePane () | |
getAutoFilter () | |
Get Autofilter. | |
getBackgroundExtension () | |
getBackgroundImage () | |
getBackgroundMime () | |
getBreaks () | |
Get breaks. | |
getCell (CellAddress|string|array $coordinate) | |
Get cell at a specific coordinate. | |
getCellCollection () | |
Return the cell collection. | |
getChartByIndex (?string $index) | |
Get a chart by its index position. | |
getChartByName (string $chartName) | |
Get a chart by name. | |
getChartByNameOrThrow (string $chartName) | |
getChartCollection () | |
Get collection of charts. | |
getChartCount () | |
Return the count of charts on this worksheet. | |
getChartNames () | |
Return an array of the names of charts on this worksheet. | |
getCodeName () | |
Return the code name of the sheet. | |
getColumnBreaks () | |
Get column breaks. | |
getColumnDimension (string $column) | |
Get column dimension at a specific column. | |
getColumnDimensionByColumn (int $columnIndex) | |
Get column dimension at a specific column by using numeric cell coordinates. | |
getColumnDimensions () | |
Get collection of column dimensions. | |
getColumnIterator (string $startColumn='A', ?string $endColumn=null) | |
Get column iterator. | |
getColumnStyle (string $column) | |
getComment (CellAddress|string|array $cellCoordinate, bool $attachNew=true) | |
Get comment for cell. | |
getComments () | |
Get comments. | |
getConditionalRange (string $coordinate) | |
getConditionalStyles (string $coordinate, bool $firstOnly=true) | |
Get conditional styles for a cell. | |
getConditionalStylesCollection () | |
Get collection of conditional styles. | |
getCoordinates (bool $sorted=true) | |
Get a sorted list of all cell coordinates currently held in the collection by row and column. | |
getDataValidation (string $cellCoordinate) | |
Get data validation. | |
getDataValidationCollection () | |
Get collection of data validations. | |
getDefaultColumnDimension () | |
Get default column dimension. | |
getDefaultRowDimension () | |
Get default row dimension. | |
getDrawingCollection () | |
Get collection of drawings. | |
getFreezePane () | |
Get Freeze Pane. | |
getHashInt () | |
getHeaderFooter () | |
Get page header/footer. | |
getHighestColumn ($row=null) | |
Get highest worksheet column. | |
getHighestDataColumn ($row=null) | |
Get highest worksheet column that contains data. | |
getHighestDataRow (?string $column=null) | |
Get highest worksheet row that contains data. | |
getHighestRow (?string $column=null) | |
Get highest worksheet row. | |
getHighestRowAndColumn () | |
Get highest worksheet column and highest row that have cell records. | |
getHyperlink (string $cellCoordinate) | |
Get hyperlink. | |
getHyperlinkCollection () | |
Get collection of hyperlinks. | |
getMergeCells () | |
Get merge cells array. | |
getPageMargins () | |
Get page margins. | |
getPageSetup () | |
Get page setup. | |
getPane (string $position) | |
getPanes () | |
getPaneState () | |
getPaneTopLeftCell () | |
getParent () | |
Get parent or null. | |
getParentOrThrow () | |
Get parent, throw exception if null. | |
getPrintGridlines () | |
Print gridlines? | |
getProtectedCellRanges () | |
Get protected cells. | |
getProtection () | |
Get Protection. | |
getRightToLeft () | |
Get right-to-left. | |
getRowBreaks () | |
Get row breaks. | |
getRowDimension (int $row) | |
Get row dimension at a specific row. | |
getRowDimensions () | |
Get collection of row dimensions. | |
getRowIterator (int $startRow=1, ?int $endRow=null) | |
Get row iterator. | |
getRowStyle (int $row) | |
getSelectedCells () | |
Get selected cells. | |
getSheetState () | |
Get sheet state. | |
getSheetView () | |
Get sheet view. | |
getShowGridlines () | |
Show gridlines? | |
getShowRowColHeaders () | |
Show row and column headers? | |
getShowSummaryBelow () | |
Show summary below? | |
getShowSummaryRight () | |
Show summary right? | |
getStyle (AddressRange|CellAddress|int|string|array $cellCoordinate) | |
Get style for cell. | |
getTabColor () | |
Get tab color. | |
getTableByName (string $name) | |
getTableCollection () | |
Get collection of Tables. | |
getTableNames () | |
getTitle () | |
Get title. | |
getTopLeftCell () | |
Get the default position of the right bottom pane. | |
getXSplit () | |
getYSplit () | |
hasCodeName () | |
Sheet has a code name ? | |
hyperlinkExists (string $coordinate) | |
Hyperlink at a specific coordinate exists? | |
insertNewColumnBefore (string $before, int $numberOfColumns=1) | |
Insert a new column, updating all possible related data. | |
insertNewColumnBeforeByIndex (int $beforeColumnIndex, int $numberOfColumns=1) | |
Insert a new column, updating all possible related data. | |
insertNewRowBefore (int $before, int $numberOfRows=1) | |
Insert a new row, updating all possible related data. | |
isCellHiddenOnFormulaBar (string $coordinate) | |
Same as Cell->isHiddenOnFormulaBar, but without creating cell if it doesn't exist. | |
isCellInSpillRange (string $coordinate) | |
isCellLocked (string $coordinate) | |
Same as Cell->isLocked, but without creating cell if it doesn't exist. | |
isEmptyColumn (string $columnId, int $definitionOfEmptyFlags=0) | |
Returns a boolean true if the specified column contains no cells. | |
isEmptyRow (int $rowId, int $definitionOfEmptyFlags=0) | |
Returns a boolean true if the specified row contains no cells. | |
isRowVisible (int $row) | |
isTabColorSet () | |
Tab color set? | |
mergeCellBehaviour (Cell $cell, string $upperLeft, string $behaviour, array $leftCellValue) | |
mergeCells (AddressRange|string|array $range, string $behaviour=self::MERGE_CELL_CONTENT_EMPTY) | |
Set merge on a cell range. | |
namedRangeToArray (string $definedName, mixed $nullValue=null, bool $calculateFormulas=true, bool $formatData=true, bool $returnCellRef=false, bool $ignoreHidden=false, bool $reduceArrays=false) | |
Create array from a range of cells. | |
protectCells (AddressRange|CellAddress|int|string|array $range, string $password='', bool $alreadyHashed=false, string $name='', string $securityDescriptor='') | |
Set protection on a cell or cell range. | |
rangeToArray (string $range, mixed $nullValue=null, bool $calculateFormulas=true, bool $formatData=true, bool $returnCellRef=false, bool $ignoreHidden=false, bool $reduceArrays=false) | |
Create array from a range of cells. | |
rangeToArrayYieldRows (string $range, mixed $nullValue=null, bool $calculateFormulas=true, bool $formatData=true, bool $returnCellRef=false, bool $ignoreHidden=false, bool $reduceArrays=false) | |
Create array from a range of cells, yielding each row in turn. | |
rebindParent (Spreadsheet $parent) | |
Re-bind parent. | |
refreshColumnDimensions () | |
Refresh column dimensions. | |
refreshRowDimensions () | |
Refresh row dimensions. | |
removeAutoFilter () | |
Remove autofilter. | |
removeColumn (string $column, int $numberOfColumns=1) | |
Remove a column, updating all possible related data. | |
removeColumnByIndex (int $columnIndex, int $numColumns=1) | |
Remove a column, updating all possible related data. | |
removeComment (CellAddress|string|array $cellCoordinate) | |
Remove comment from cell. | |
removeConditionalStyles (string $coordinate) | |
Removes conditional styles for a cell. | |
removeRow (int $row, int $numberOfRows=1) | |
Delete a row, updating all possible related data. | |
removeTableByName (string $name) | |
Remove Table by name. | |
removeTableCollection () | |
Remove collection of Tables. | |
resetTabColor () | |
Reset tab color. | |
rowDimensionExists (int $row) | |
setActivePane (string $activePane) | |
setAutoFilter (AddressRange|string|array|AutoFilter $autoFilterOrRange) | |
Set AutoFilter. | |
setBackgroundImage (string $backgroundImage) | |
Set background image. | |
setBreak (CellAddress|string|array $coordinate, int $break, int $max=-1) | |
Set break on a cell. | |
setCellValue (CellAddress|string|array $coordinate, mixed $value, ?IValueBinder $binder=null) | |
Set a cell value. | |
setCellValueExplicit (CellAddress|string|array $coordinate, mixed $value, string $dataType) | |
Set a cell value. | |
setCodeName (string $codeName, bool $validate=true) | |
Define the code name of the sheet. | |
setComments (array $comments) | |
Set comments array for the entire sheet. | |
setConditionalStyles (string $coordinate, array $styles) | |
Set conditional styles. | |
setDataValidation (string $cellCoordinate, ?DataValidation $dataValidation=null) | |
Set data validation. | |
setHeaderFooter (HeaderFooter $headerFooter) | |
Set page header/footer. | |
setHyperlink (string $cellCoordinate, ?Hyperlink $hyperlink=null) | |
Set hyperlink. | |
setMergeCells (array $mergeCells) | |
Set merge cells array for the entire sheet. | |
setPageMargins (PageMargins $pageMargins) | |
Set page margins. | |
setPageSetup (PageSetup $pageSetup) | |
Set page setup. | |
setPane (string $position, ?Pane $pane) | |
setPaneState (string $paneState) | |
setPaneTopLeftCell (string $paneTopLeftCell) | |
setParent (Spreadsheet $parent) | |
setPrintGridlines (bool $printGridLines) | |
Set print gridlines. | |
setProtection (Protection $protection) | |
Set Protection. | |
setRightToLeft (bool $value) | |
Set right-to-left. | |
setSelectedCell (string $coordinate) | |
Selected cell. | |
setSelectedCells (AddressRange|CellAddress|int|string|array $coordinate) | |
Select a range of cells. | |
setSheetState (string $value) | |
Set sheet state. | |
setSheetView (SheetView $sheetView) | |
Set sheet view. | |
setShowGridlines (bool $showGridLines) | |
Set show gridlines. | |
setShowRowColHeaders (bool $showRowColHeaders) | |
Set show row and column headers. | |
setShowSummaryBelow (bool $showSummaryBelow) | |
Set show summary below. | |
setShowSummaryRight (bool $showSummaryRight) | |
Set show summary right. | |
setTitle (string $title, bool $updateFormulaCellReferences=true, bool $validate=true) | |
Set title. | |
setTopLeftCell (string $topLeftCell) | |
setXSplit (int $xSplit) | |
setYSplit (int $ySplit) | |
shrinkRangeToFit (string $range) | |
Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet. | |
toArray (mixed $nullValue=null, bool $calculateFormulas=true, bool $formatData=true, bool $returnCellRef=false, bool $ignoreHidden=false, bool $reduceArrays=false) | |
Create array from worksheet. | |
unfreezePane () | |
Unfreeze Pane. | |
unmergeCells (AddressRange|string|array $range) | |
Remove merge on a cell range. | |
unprotectCells (AddressRange|CellAddress|int|string|array $range) | |
Remove protection on a cell or cell range. | |
usesPanes () | |
Static Public Member Functions | |
static | extractSheetTitle (?string $range, bool $returnRange=false, bool $unapostrophize=false) |
Extract worksheet title from range. | |
static | getInvalidCharacters () |
Get array of invalid characters for sheet title. | |
static | nameRequiresQuotes (string $sheetName) |
static | unApostrophizeTitle (?string $title) |
Protected Member Functions | |
cellToArray (Cell $cell, bool $calculateFormulas, bool $formatData, mixed $nullValue) | |
getTableIndexByName (string $name) | |
Static Protected Member Functions | |
static | compareColumnBreaks (string $coordinate1, string $coordinate2) |
static | compareRowBreaks (string $coordinate1, string $coordinate2) |
Protected Attributes | |
const | SHEET_NAME_REQUIRES_NO_QUOTES = '/^[_\p{L}][_\p{L}\p{N}]*$/mui' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::addTable | ( | Table | $table | ) |
Add Table.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::calculateColumnWidths | ( | ) |
Calculate widths for auto-size columns.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::calculateWorksheetDataDimension | ( | ) |
Calculate worksheet data dimension.
string | String containing the dimension of this worksheet that actually contain data |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::calculateWorksheetDimension | ( | ) |
Calculate worksheet dimension.
string | String containing the dimension of this worksheet |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::cellExists | ( | CellAddress|string|array | $coordinate | ) |
Does the cell at a specific coordinate exist?
array{0 | int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. |
|
protected |
null | bool | float | int | RichText | string | $nullValue | value to use when null |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::conditionalStylesExists | ( | string | $coordinate | ) |
Do conditional styles exist for this cell?
string | $coordinate | eg: 'A1' or 'A1:A3'. If a single cell is specified, then this method will return true if that cell is included in a conditional style range. If a range of cells is specified, then true will only be returned if the range matches the entire range of the conditional. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::copyCells | ( | string | $fromCell, |
string | $toCells, | ||
bool | $copyStyle = true ) |
Copy cells, adjusting relative cell references in formulas.
Acts similarly to Excel "fill handle" feature.
string | $fromCell | Single source cell, e.g. C3 |
string | $toCells | Single cell or cell range, e.g. C4 or C4:C10 |
bool | $copyStyle | Copy styles as well as values, defaults to true |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::createNewCell | ( | string | $coordinate | ) |
Create a new cell at the specified coordinate.
string | $coordinate | Coordinate of the cell |
Cell | Cell that was created WARNING: Because the cell collection can be cached to reduce memory, it only allows one "active" cell at a time in memory. If you assign that cell to a variable, then select another cell using getCell() or any of its variants, the newly selected cell becomes the "active" cell, and any previous assignment becomes a disconnected reference because the active cell has changed. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::dataValidationExists | ( | string | $coordinate | ) |
Data validation at a specific coordinate exists?
string | $coordinate | eg: 'A1' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::duplicateConditionalStyle | ( | array | $styles, |
string | $range = '' ) |
Duplicate conditional style to a range of cells.
Please note that this will overwrite existing cell styles for cells in range!
Conditional[] | $styles | Cell style to duplicate |
string | $range | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::duplicateStyle | ( | Style | $style, |
string | $range ) |
Duplicate cell style to a range of cells.
Please note that this will overwrite existing cell styles for cells in range!
Style | $style | Cell style to duplicate |
string | $range | Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") |
$this |
|
static |
Extract worksheet title from range.
Example: extractSheetTitle("testSheet!A1") ==> 'A1' Example: extractSheetTitle("testSheet!A1:C3") ==> 'A1:C3' Example: extractSheetTitle("'testSheet 1'!A1", true) ==> ['testSheet 1', 'A1']; Example: extractSheetTitle("'testSheet 1'!A1:C3", true) ==> ['testSheet 1', 'A1:C3']; Example: extractSheetTitle("A1", true) ==> ['', 'A1']; Example: extractSheetTitle("A1:C3", true) ==> ['', 'A1:C3']
?string | $range | Range to extract title from |
bool | $returnRange | Return range? (see example) |
($range | is non-empty-string ? ($returnRange is true ? array{0: string, 1: string} : string) : ($returnRange is true ? array{0: null, 1: null} : null)) |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::freezePane | ( | null|CellAddress|string|array | $coordinate, |
null|CellAddress|string|array | $topLeftCell = null, | ||
bool | $frozenSplit = false ) |
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|array{0 | int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. Passing a null value for this argument will clear any existing freeze pane for this worksheet. |
null|array{0 | int, 1: int}|CellAddress|string $topLeftCell default position of the right bottom pane Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::fromArray | ( | array | $source, |
mixed | $nullValue = null, | ||
string | $startCell = 'A1', | ||
bool | $strictNullComparison = false ) |
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 |
bool | $strictNullComparison | Apply strict comparison when testing for null values in the array |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::garbageCollect | ( | ) |
Run PhpSpreadsheet garbage collector.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getActiveCell | ( | ) |
Get active cell.
string | Example: 'A1' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getBreaks | ( | ) |
Get breaks.
int[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getCell | ( | CellAddress|string|array | $coordinate | ) |
Get cell at a specific coordinate.
array{0 | int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. |
Cell | Cell that was found or created WARNING: Because the cell collection can be cached to reduce memory, it only allows one "active" cell at a time in memory. If you assign that cell to a variable, then select another cell using getCell() or any of its variants, the newly selected cell becomes the "active" cell, and any previous assignment becomes a disconnected reference because the active cell has changed. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getChartByIndex | ( | ?string | $index | ) |
Get a chart by its index position.
?string | $index | Chart index position |
Chart|false |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getChartByName | ( | string | $chartName | ) |
Get a chart by name.
string | $chartName | Chart name |
Chart|false |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getChartCollection | ( | ) |
Get collection of charts.
ArrayObject<int,Chart> |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getChartCount | ( | ) |
Return the count of charts on this worksheet.
int | The number of charts |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getChartNames | ( | ) |
Return an array of the names of charts on this worksheet.
string[] | The names of charts |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getColumnBreaks | ( | ) |
Get column breaks.
PageBreak[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getColumnDimension | ( | string | $column | ) |
Get column dimension at a specific column.
string | $column | String index of the column eg: 'A' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getColumnDimensionByColumn | ( | int | $columnIndex | ) |
Get column dimension at a specific column by using numeric cell coordinates.
int | $columnIndex | Numeric column coordinate of the cell |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getColumnDimensions | ( | ) |
Get collection of column dimensions.
ColumnDimension[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getColumnIterator | ( | string | $startColumn = 'A', |
?string | $endColumn = null ) |
Get column iterator.
string | $startColumn | The column address at which to start iterating |
?string | $endColumn | The column address at which to stop iterating |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getComment | ( | CellAddress|string|array | $cellCoordinate, |
bool | $attachNew = true ) |
Get comment for cell.
array{0 | int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getComments | ( | ) |
Get comments.
Comment[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getConditionalStyles | ( | string | $coordinate, |
bool | $firstOnly = true ) |
Get conditional styles for a cell.
string | $coordinate | eg: 'A1' or 'A1:A3'. If a single cell is referenced, then the array of conditional styles will be returned if the cell is included in a conditional style range. If a range of cells is specified, then the styles will only be returned if the range matches the entire range of the conditional. |
bool | $firstOnly | default true, return all matching conditionals ordered by priority if false, first only if true |
Conditional[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getCoordinates | ( | bool | $sorted = true | ) |
Get a sorted list of all cell coordinates currently held in the collection by row and column.
bool | $sorted | Also sort the cell collection? |
string[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getDataValidation | ( | string | $cellCoordinate | ) |
Get data validation.
string | $cellCoordinate | Cell coordinate to get data validation for, eg: 'A1' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getDataValidationCollection | ( | ) |
Get collection of data validations.
DataValidation[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getDrawingCollection | ( | ) |
Get collection of drawings.
ArrayObject<int,BaseDrawing> |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHighestColumn | ( | $row = null | ) |
Get highest worksheet column.
null | int | string | $row | Return the data highest column for the specified row, or the highest column of any row if no row number is passed |
string | Highest column name |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHighestDataColumn | ( | $row = null | ) |
Get highest worksheet column that contains data.
null | int | 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 |
string | Highest column name that contains data |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHighestDataRow | ( | ?string | $column = null | ) |
Get highest worksheet row that contains data.
null | 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 |
int | Highest row number that contains data |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHighestRow | ( | ?string | $column = null | ) |
Get highest worksheet row.
null | string | $column | Return the highest data row for the specified column, or the highest row of any column if no column letter is passed |
int | Highest row number |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHighestRowAndColumn | ( | ) |
Get highest worksheet column and highest row that have cell records.
array | Highest column name and highest row number |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHyperlink | ( | string | $cellCoordinate | ) |
Get hyperlink.
string | $cellCoordinate | Cell coordinate to get hyperlink for, eg: 'A1' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getHyperlinkCollection | ( | ) |
Get collection of hyperlinks.
Hyperlink[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getMergeCells | ( | ) |
Get merge cells array.
string[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getPanes | ( | ) |
(null|Pane)[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getProtectedCellRanges | ( | ) |
Get protected cells.
ProtectedRange[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getRowBreaks | ( | ) |
Get row breaks.
PageBreak[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getRowDimension | ( | int | $row | ) |
Get row dimension at a specific row.
int | $row | Numeric index of the row |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getRowDimensions | ( | ) |
Get collection of row dimensions.
RowDimension[] |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getRowIterator | ( | int | $startRow = 1, |
?int | $endRow = null ) |
Get row iterator.
int | $startRow | The row number at which to start iterating |
?int | $endRow | The row number at which to stop iterating |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getSheetState | ( | ) |
Get sheet state.
string | Sheet state (visible, hidden, veryHidden) |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getShowSummaryBelow | ( | ) |
Show summary below?
(Row/Column outlining).
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getShowSummaryRight | ( | ) |
Show summary right?
(Row/Column outlining).
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getStyle | ( | AddressRange|CellAddress|int|string|array | $cellCoordinate | ) |
Get style for cell.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $cellCoordinate A simple string containing a cell address like 'A1' or a cell range like 'A1:E10' or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or a CellAddress or AddressRange object. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getTableByName | ( | string | $name | ) |
string | $name | the table name to search |
null|Table | The table from the tables collection, or null if not found |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getTableCollection | ( | ) |
Get collection of Tables.
ArrayObject<int,Table> |
|
protected |
string | $name | the table name to search |
null|int | The index of the located table in the tables collection, or null if not found |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getTableNames | ( | ) |
string[] | array of Table names |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::hyperlinkExists | ( | string | $coordinate | ) |
Hyperlink at a specific coordinate exists?
string | $coordinate | eg: 'A1' |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::insertNewColumnBefore | ( | string | $before, |
int | $numberOfColumns = 1 ) |
Insert a new column, updating all possible related data.
string | $before | Insert before this column Name, eg: 'A' |
int | $numberOfColumns | Number of new columns to insert |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::insertNewColumnBeforeByIndex | ( | int | $beforeColumnIndex, |
int | $numberOfColumns = 1 ) |
Insert a new column, updating all possible related data.
int | $beforeColumnIndex | Insert before this column ID (numeric column coordinate of the cell) |
int | $numberOfColumns | Number of new columns to insert |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::insertNewRowBefore | ( | int | $before, |
int | $numberOfRows = 1 ) |
Insert a new row, updating all possible related data.
int | $before | Insert before this row number |
int | $numberOfRows | Number of new rows to insert |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::isEmptyColumn | ( | string | $columnId, |
int | $definitionOfEmptyFlags = 0 ) |
Returns a boolean true if the specified column contains no cells.
By default, this means that no cell records exist in the collection for this column. false will be returned otherwise. This rule can be modified by passing a $definitionOfEmptyFlags value: 1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value cells, then the column will be considered empty. 2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty string value cells, then the column will be considered empty. 3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are null value or empty string value cells, then the column will be considered empty.
int | $definitionOfEmptyFlags | Possible Flag Values are: CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::isEmptyRow | ( | int | $rowId, |
int | $definitionOfEmptyFlags = 0 ) |
Returns a boolean true if the specified row contains no cells.
By default, this means that no cell records exist in the collection for this row. false will be returned otherwise. This rule can be modified by passing a $definitionOfEmptyFlags value: 1 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL If the only cells in the collection are null value cells, then the row will be considered empty. 2 - CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are empty string value cells, then the row will be considered empty. 3 - CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL | CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL If the only cells in the collection are null value or empty string value cells, then the row will be considered empty.
int | $definitionOfEmptyFlags | Possible Flag Values are: CellIterator::TREAT_NULL_VALUE_AS_EMPTY_CELL CellIterator::TREAT_EMPTY_STRING_AS_EMPTY_CELL |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::mergeCells | ( | AddressRange|string|array | $range, |
string | $behaviour = self::MERGE_CELL_CONTENT_EMPTY ) |
Set merge on a cell range.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range A simple string containing a Cell range like 'A1:E10' or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or an AddressRange. | |
string | $behaviour | How the merged cells should behave. Possible values are: MERGE_CELL_CONTENT_EMPTY - Empty the content of the hidden cells MERGE_CELL_CONTENT_HIDE - Keep the content of the hidden cells MERGE_CELL_CONTENT_MERGE - Move the content of the hidden cells into the first cell |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::namedRangeToArray | ( | string | $definedName, |
mixed | $nullValue = null, | ||
bool | $calculateFormulas = true, | ||
bool | $formatData = true, | ||
bool | $returnCellRef = false, | ||
bool | $ignoreHidden = false, | ||
bool | $reduceArrays = false ) |
Create array from a range of cells.
string | $definedName | The Named Range that should be returned |
null | bool | float | int | RichText | string | $nullValue | Value returned in the array entry if a cell doesn't exist |
bool | $calculateFormulas | Should formulas be calculated? |
bool | $formatData | Should formatting be applied to cell values? |
bool | $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 |
bool | $ignoreHidden | False - Return values for rows/columns even if they are defined as hidden. True - Don't return values for rows/columns that are defined as hidden. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::protectCells | ( | AddressRange|CellAddress|int|string|array | $range, |
string | $password = '', | ||
bool | $alreadyHashed = false, | ||
string | $name = '', | ||
string | $securityDescriptor = '' ) |
Set protection on a cell or cell range.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $range A simple string containing a Cell range like 'A1:E10' or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or a CellAddress or AddressRange object. | |
string | $password | Password to unlock the protection |
bool | $alreadyHashed | If the password has already been hashed, set this to true |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::rangeToArray | ( | string | $range, |
mixed | $nullValue = null, | ||
bool | $calculateFormulas = true, | ||
bool | $formatData = true, | ||
bool | $returnCellRef = false, | ||
bool | $ignoreHidden = false, | ||
bool | $reduceArrays = false ) |
Create array from a range of cells.
null | bool | float | int | RichText | string | $nullValue | Value returned in the array entry if a cell doesn't exist |
bool | $calculateFormulas | Should formulas be calculated? |
bool | $formatData | Should formatting be applied to cell values? |
bool | $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 |
bool | $ignoreHidden | False - Return values for rows/columns even if they are defined as hidden. True - Don't return values for rows/columns that are defined as hidden. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::rangeToArrayYieldRows | ( | string | $range, |
mixed | $nullValue = null, | ||
bool | $calculateFormulas = true, | ||
bool | $formatData = true, | ||
bool | $returnCellRef = false, | ||
bool | $ignoreHidden = false, | ||
bool | $reduceArrays = false ) |
Create array from a range of cells, yielding each row in turn.
null | bool | float | int | RichText | string | $nullValue | Value returned in the array entry if a cell doesn't exist |
bool | $calculateFormulas | Should formulas be calculated? |
bool | $formatData | Should formatting be applied to cell values? |
bool | $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 |
bool | $ignoreHidden | False - Return values for rows/columns even if they are defined as hidden. True - Don't return values for rows/columns that are defined as hidden. |
Generator<array> |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::rebindParent | ( | Spreadsheet | $parent | ) |
Re-bind parent.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::refreshColumnDimensions | ( | ) |
Refresh column dimensions.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::refreshRowDimensions | ( | ) |
Refresh row dimensions.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::removeColumn | ( | string | $column, |
int | $numberOfColumns = 1 ) |
Remove a column, updating all possible related data.
string | $column | Remove columns starting with this column name, eg: 'A' |
int | $numberOfColumns | Number of columns to remove |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::removeColumnByIndex | ( | int | $columnIndex, |
int | $numColumns = 1 ) |
Remove a column, updating all possible related data.
int | $columnIndex | Remove starting with this column Index (numeric column coordinate) |
int | $numColumns | Number of columns to remove |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::removeComment | ( | CellAddress|string|array | $cellCoordinate | ) |
Remove comment from cell.
array{0 | int, 1: int}|CellAddress|string $cellCoordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::removeConditionalStyles | ( | string | $coordinate | ) |
Removes conditional styles for a cell.
string | $coordinate | eg: 'A1' |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::removeRow | ( | int | $row, |
int | $numberOfRows = 1 ) |
Delete a row, updating all possible related data.
int | $row | Remove rows, starting with this row number |
int | $numberOfRows | Number of rows to remove |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::removeTableByName | ( | string | $name | ) |
Remove Table by name.
string | $name | Table name |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::resetTabColor | ( | ) |
Reset tab color.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setAutoFilter | ( | AddressRange|string|array|AutoFilter | $autoFilterOrRange | ) |
Set AutoFilter.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|AutoFilter|string $autoFilterOrRange A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or an AddressRange. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setBackgroundImage | ( | string | $backgroundImage | ) |
Set background image.
Used on read/write for Xlsx. Used on write for Html.
string | $backgroundImage | Image represented as a string, e.g. results of file_get_contents |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setBreak | ( | CellAddress|string|array | $coordinate, |
int | $break, | ||
int | $max = -1 ) |
Set break on a cell.
array{0 | int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. | |
int | $break | Break type (type of Worksheet::BREAK_*) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setCellValue | ( | CellAddress|string|array | $coordinate, |
mixed | $value, | ||
?IValueBinder | $binder = null ) |
Set a cell value.
array{0 | int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. | |
mixed | $value | Value for the cell |
null | IValueBinder | $binder | Value Binder to override the currently set Value Binder |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setCellValueExplicit | ( | CellAddress|string|array | $coordinate, |
mixed | $value, | ||
string | $dataType ) |
Set a cell value.
array{0 | int, 1: int}|CellAddress|string $coordinate Coordinate of the cell as a string, eg: 'C5'; or as an array of [$columnIndex, $row] (e.g. [3, 5]), or a CellAddress object. | |
mixed | $value | Value of the cell |
string | $dataType | Explicit data type, see DataType::TYPE_* Note that PhpSpreadsheet does not validate that the value and datatype are consistent, in using this method, then it is your responsibility as an end-user developer to validate that the value and the datatype match. If you do mismatch value and datatpe, then the value you enter may be changed to match the datatype that you specify. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setCodeName | ( | string | $codeName, |
bool | $validate = true ) |
Define the code name of the sheet.
string | $codeName | Same rule as Title minus space not allowed (but, like Excel, change silently space to underscore) |
bool | $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. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setComments | ( | array | $comments | ) |
Set comments array for the entire sheet.
Comment[] | $comments |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setConditionalStyles | ( | string | $coordinate, |
array | $styles ) |
Set conditional styles.
string | $coordinate | eg: 'A1' |
Conditional[] | $styles |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setDataValidation | ( | string | $cellCoordinate, |
?DataValidation | $dataValidation = null ) |
Set data validation.
string | $cellCoordinate | Cell coordinate to insert data validation, eg: 'A1' |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setHeaderFooter | ( | HeaderFooter | $headerFooter | ) |
Set page header/footer.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setHyperlink | ( | string | $cellCoordinate, |
?Hyperlink | $hyperlink = null ) |
Set hyperlink.
string | $cellCoordinate | Cell coordinate to insert hyperlink, eg: 'A1' |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setMergeCells | ( | array | $mergeCells | ) |
Set merge cells array for the entire sheet.
Use instead mergeCells() to merge a single cell range.
string[] | $mergeCells |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setPageMargins | ( | PageMargins | $pageMargins | ) |
Set page margins.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setPageSetup | ( | PageSetup | $pageSetup | ) |
Set page setup.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setPrintGridlines | ( | bool | $printGridLines | ) |
Set print gridlines.
bool | $printGridLines | Print gridlines (true/false) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setProtection | ( | Protection | $protection | ) |
Set Protection.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setRightToLeft | ( | bool | $value | ) |
Set right-to-left.
bool | $value | Right-to-left true/false |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setSelectedCell | ( | string | $coordinate | ) |
Selected cell.
string | $coordinate | Cell (i.e. A1) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setSelectedCells | ( | AddressRange|CellAddress|int|string|array | $coordinate | ) |
Select a range of cells.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $coordinate A simple string containing a Cell range like 'A1:E10' or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or a CellAddress or AddressRange object. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setSheetState | ( | string | $value | ) |
Set sheet state.
string | $value | Sheet state (visible, hidden, veryHidden) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setSheetView | ( | SheetView | $sheetView | ) |
Set sheet view.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setShowGridlines | ( | bool | $showGridLines | ) |
Set show gridlines.
bool | $showGridLines | Show gridlines (true/false) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setShowRowColHeaders | ( | bool | $showRowColHeaders | ) |
Set show row and column headers.
bool | $showRowColHeaders | Show row and column headers (true/false) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setShowSummaryBelow | ( | bool | $showSummaryBelow | ) |
Set show summary below.
bool | $showSummaryBelow | Show summary below (true/false) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setShowSummaryRight | ( | bool | $showSummaryRight | ) |
Set show summary right.
bool | $showSummaryRight | Show summary right (true/false) |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::setTitle | ( | string | $title, |
bool | $updateFormulaCellReferences = true, | ||
bool | $validate = true ) |
Set title.
string | $title | String containing the dimension of this worksheet |
bool | $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 |
bool | $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. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::shrinkRangeToFit | ( | string | $range | ) |
Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet.
string | Adjusted range value |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::toArray | ( | mixed | $nullValue = null, |
bool | $calculateFormulas = true, | ||
bool | $formatData = true, | ||
bool | $returnCellRef = false, | ||
bool | $ignoreHidden = false, | ||
bool | $reduceArrays = false ) |
Create array from worksheet.
null | bool | float | int | RichText | string | $nullValue | Value returned in the array entry if a cell doesn't exist |
bool | $calculateFormulas | Should formulas be calculated? |
bool | $formatData | Should formatting be applied to cell values? |
bool | $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 |
bool | $ignoreHidden | False - Return values for rows/columns even if they are defined as hidden. True - Don't return values for rows/columns that are defined as hidden. |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::unfreezePane | ( | ) |
Unfreeze Pane.
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::unmergeCells | ( | AddressRange|string|array | $range | ) |
Remove merge on a cell range.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|string $range A simple string containing a Cell range like 'A1:E10' or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or an AddressRange. |
$this |
PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::unprotectCells | ( | AddressRange|CellAddress|int|string|array | $range | ) |
Remove protection on a cell or cell range.
AddressRange<CellAddress>|AddressRange<int>|AddressRange<string>|array{0 | int, 1: int, 2: int, 3: int}|array{0: int, 1: int}|CellAddress|int|string $range A simple string containing a Cell range like 'A1:E10' or passing in an array of [$fromColumnIndex, $fromRow, $toColumnIndex, $toRow] (e.g. [3, 5, 6, 8]), or a CellAddress or AddressRange object. |
$this |