Constants

ALGORITHM_MD2

ALGORITHM_MD2 = 'MD2'

ALGORITHM_MD4

ALGORITHM_MD4 = 'MD4'

ALGORITHM_MD5

ALGORITHM_MD5 = 'MD5'

ALGORITHM_SHA_1

ALGORITHM_SHA_1 = 'SHA-1'

ALGORITHM_SHA_256

ALGORITHM_SHA_256 = 'SHA-256'

ALGORITHM_SHA_384

ALGORITHM_SHA_384 = 'SHA-384'

ALGORITHM_SHA_512

ALGORITHM_SHA_512 = 'SHA-512'

ALGORITHM_RIPEMD_128

ALGORITHM_RIPEMD_128 = 'RIPEMD-128'

ALGORITHM_RIPEMD_160

ALGORITHM_RIPEMD_160 = 'RIPEMD-160'

ALGORITHM_WHIRLPOOL

ALGORITHM_WHIRLPOOL = 'WHIRLPOOL'

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

Hashed password.

Type

string

$algorithm

$algorithm : string

Algorithm name.

Type

string

$hash

$hash : string

Hash value.

Type

string

$salt

$salt : string

Salt value.

Type

string

$spinCount

$spinCount : integer

Spin count.

Type

integer

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

setSheet()

setSheet(boolean  $pValue) : $this

Set Sheet.

Parameters

boolean $pValue

Returns

$this

getObjects()

getObjects() : boolean

Get Objects.

Returns

boolean

setObjects()

setObjects(boolean  $pValue) : $this

Set Objects.

Parameters

boolean $pValue

Returns

$this

getScenarios()

getScenarios() : boolean

Get Scenarios.

Returns

boolean

setScenarios()

setScenarios(boolean  $pValue) : $this

Set Scenarios.

Parameters

boolean $pValue

Returns

$this

getFormatCells()

getFormatCells() : boolean

Get FormatCells.

Returns

boolean

setFormatCells()

setFormatCells(boolean  $pValue) : $this

Set FormatCells.

Parameters

boolean $pValue

Returns

$this

getFormatColumns()

getFormatColumns() : boolean

Get FormatColumns.

Returns

boolean

setFormatColumns()

setFormatColumns(boolean  $pValue) : $this

Set FormatColumns.

Parameters

boolean $pValue

Returns

$this

getFormatRows()

getFormatRows() : boolean

Get FormatRows.

Returns

boolean

setFormatRows()

setFormatRows(boolean  $pValue) : $this

Set FormatRows.

Parameters

boolean $pValue

Returns

$this

getInsertColumns()

getInsertColumns() : boolean

Get InsertColumns.

Returns

boolean

setInsertColumns()

setInsertColumns(boolean  $pValue) : $this

Set InsertColumns.

Parameters

boolean $pValue

Returns

$this

getInsertRows()

getInsertRows() : boolean

Get InsertRows.

Returns

boolean

setInsertRows()

setInsertRows(boolean  $pValue) : $this

Set InsertRows.

Parameters

boolean $pValue

Returns

$this

getInsertHyperlinks()

getInsertHyperlinks() : boolean

Get InsertHyperlinks.

Returns

boolean

setInsertHyperlinks()

setInsertHyperlinks(boolean  $pValue) : $this

Set InsertHyperlinks.

Parameters

boolean $pValue

Returns

$this

getDeleteColumns()

getDeleteColumns() : boolean

Get DeleteColumns.

Returns

boolean

setDeleteColumns()

setDeleteColumns(boolean  $pValue) : $this

Set DeleteColumns.

Parameters

boolean $pValue

Returns

$this

getDeleteRows()

getDeleteRows() : boolean

Get DeleteRows.

Returns

boolean

setDeleteRows()

setDeleteRows(boolean  $pValue) : $this

Set DeleteRows.

Parameters

boolean $pValue

Returns

$this

getSelectLockedCells()

getSelectLockedCells() : boolean

Get SelectLockedCells.

Returns

boolean

setSelectLockedCells()

setSelectLockedCells(boolean  $pValue) : $this

Set SelectLockedCells.

Parameters

boolean $pValue

Returns

$this

getSort()

getSort() : boolean

Get Sort.

Returns

boolean

setSort()

setSort(boolean  $pValue) : $this

Set Sort.

Parameters

boolean $pValue

Returns

$this

getAutoFilter()

getAutoFilter() : boolean

Get AutoFilter.

Returns

boolean

setAutoFilter()

setAutoFilter(boolean  $pValue) : $this

Set AutoFilter.

Parameters

boolean $pValue

Returns

$this

getPivotTables()

getPivotTables() : boolean

Get PivotTables.

Returns

boolean

setPivotTables()

setPivotTables(boolean  $pValue) : $this

Set PivotTables.

Parameters

boolean $pValue

Returns

$this

getSelectUnlockedCells()

getSelectUnlockedCells() : boolean

Get SelectUnlockedCells.

Returns

boolean

setSelectUnlockedCells()

setSelectUnlockedCells(boolean  $pValue) : $this

Set SelectUnlockedCells.

Parameters

boolean $pValue

Returns

$this

getPassword()

getPassword() : string

Get hashed password.

Returns

string

setPassword()

setPassword(string  $pValue, boolean  $pAlreadyHashed = false) : $this

Set Password.

Parameters

string $pValue
boolean $pAlreadyHashed

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

Returns

$this

getAlgorithm()

getAlgorithm() 

Get algorithm name.

setAlgorithm()

setAlgorithm(\PhpOffice\PhpSpreadsheet\Worksheet\string  $algorithm) 

Set algorithm name.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\string $algorithm

getSalt()

getSalt() 

Get salt value.

setSalt()

setSalt(\PhpOffice\PhpSpreadsheet\Worksheet\string  $salt) 

Set salt value.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\string $salt

getSpinCount()

getSpinCount() 

Get spin count.

setSpinCount()

setSpinCount(\PhpOffice\PhpSpreadsheet\Worksheet\int  $spinCount) 

Set spin count.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\int $spinCount

verify()

verify(\PhpOffice\PhpSpreadsheet\Worksheet\string  $password) 

Verify that the given non-hashed password can "unlock" the protection.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\string $password

__clone()

__clone() 

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

generateSalt()

generateSalt() 

Create a pseudorandom string.