WorksheetProtection

WorksheetProtection class

Encapsulates worksheet protection options, which allow to protect a worksheet in the output Spreadsheet document from modification of specified type with a specified password.

public sealed class WorksheetProtection

Constructors

Name Description
WorksheetProtection() Creates new instance with default parameters. If not modified and passed to SpreadsheetSaveOptions, no worksheet protection will be applied
WorksheetProtection(WorksheetProtectionType, string) Creates new instance with specified worksheet protection type and password

Properties

Name Description
Password { get; set; } Password, which is used for protecting a worksheet. If NULL or empty string, the protection will not be applied.
ProtectionType { get; set; } Allows to specify a type of worksheet protection. By default is ‘None’ - protection is not applied.

Remarks

Most of Spreadsheet formats like XLSX allows to protect a worksheet from editing with password. This class allows to enable such protection and specify its options.

See Also