ExcelScript.WorksheetProtection interface

Represents the protection of a sheet object.

Methods

getOptions()

Specifies the protection options for the worksheet.

getProtected()

Specifies if the worksheet is protected.

protect(options, password)

Protects a worksheet. Fails if the worksheet has already been protected.

unprotect(password)

Unprotects a worksheet.

Method Details

getOptions()

Specifies the protection options for the worksheet.

getOptions(): WorksheetProtectionOptions;

Returns

getProtected()

Specifies if the worksheet is protected.

getProtected(): boolean;

Returns

boolean

protect(options, password)

Protects a worksheet. Fails if the worksheet has already been protected.

protect(options?: WorksheetProtectionOptions, password?: string): void;

Parameters

options
ExcelScript.WorksheetProtectionOptions

Optional. Sheet protection options.

password

string

Optional. Sheet protection password.

Returns

void

unprotect(password)

Unprotects a worksheet.

unprotect(password?: string): void;

Parameters

password

string

sheet protection password.

Returns

void