Properties

$sheet

$sheet : boolean

Sheet.

Type

boolean

$objects

$objects : boolean

Objects.

Type

boolean

$scenarios

$scenarios : boolean

Scenarios.

Type

boolean

$formatCells

$formatCells : boolean

Format cells.

Type

boolean

$formatColumns

$formatColumns : boolean

Format columns.

Type

boolean

$formatRows

$formatRows : boolean

Format rows.

Type

boolean

$insertColumns

$insertColumns : boolean

Insert columns.

Type

boolean

$insertRows

$insertRows : boolean

Insert rows.

Type

boolean

$insertHyperlinks

$insertHyperlinks : boolean

Insert hyperlinks.

Type

boolean

$deleteColumns

$deleteColumns : boolean

Delete columns.

Type

boolean

$deleteRows

$deleteRows : boolean

Delete rows.

Type

boolean

$selectLockedCells

$selectLockedCells : boolean

Select locked cells.

Type

boolean

$sort

$sort : boolean

Sort.

Type

boolean

$autoFilter

$autoFilter : boolean

AutoFilter.

Type

boolean

$pivotTables

$pivotTables : boolean

Pivot tables.

Type

boolean

$selectUnlockedCells

$selectUnlockedCells : boolean

Select unlocked cells.

Type

boolean

$password

$password : string

Password.

Type

string

Methods

__construct()

__construct() 

Create a new Protection.

isProtectionEnabled()

isProtectionEnabled() : boolean

Is some sort of protection enabled?

Returns

boolean

getSheet()

getSheet() : boolean

Get Sheet.

Returns

boolean

getObjects()

getObjects() : boolean

Get Objects.

Returns

boolean

getScenarios()

getScenarios() : boolean

Get Scenarios.

Returns

boolean

getFormatCells()

getFormatCells() : boolean

Get FormatCells.

Returns

boolean

getFormatColumns()

getFormatColumns() : boolean

Get FormatColumns.

Returns

boolean

getFormatRows()

getFormatRows() : boolean

Get FormatRows.

Returns

boolean

getInsertColumns()

getInsertColumns() : boolean

Get InsertColumns.

Returns

boolean

getInsertRows()

getInsertRows() : boolean

Get InsertRows.

Returns

boolean

getInsertHyperlinks()

getInsertHyperlinks() : boolean

Get InsertHyperlinks.

Returns

boolean

getDeleteColumns()

getDeleteColumns() : boolean

Get DeleteColumns.

Returns

boolean

getDeleteRows()

getDeleteRows() : boolean

Get DeleteRows.

Returns

boolean

getSelectLockedCells()

getSelectLockedCells() : boolean

Get SelectLockedCells.

Returns

boolean

getSort()

getSort() : boolean

Get Sort.

Returns

boolean

getAutoFilter()

getAutoFilter() : boolean

Get AutoFilter.

Returns

boolean

getPivotTables()

getPivotTables() : boolean

Get PivotTables.

Returns

boolean

getSelectUnlockedCells()

getSelectUnlockedCells() : boolean

Get SelectUnlockedCells.

Returns

boolean

getPassword()

getPassword() : string

Get Password (hashed).

Returns

string

setPassword()

setPassword(string  $pValue, boolean  $pAlreadyHashed = false) : \PhpOffice\PhpSpreadsheet\Worksheet\Protection

Set Password.

Parameters

string $pValue
boolean $pAlreadyHashed

If the password has already been hashed, set this to true

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Protection

__clone()

__clone() 

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