Class ExcelProtection
Sets protection on the workbook level ExcelEncryption ExcelSheetProtection
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Syntax
public class ExcelProtection : XmlHelper
Properties
LockRevision
Lock the workbook for revision
Declaration
public bool LockRevision { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
LockStructure
Locks the structure,which prevents users from adding or deleting worksheets or from displaying hidden worksheets.
Declaration
public bool LockStructure { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
LockWindows
Locks the position of the workbook window.
Declaration
public bool LockWindows { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
WriteProtection
File sharing settings for the workbook.
Declaration
public ExcelWriteProtection WriteProtection { get; }
Property Value
| Type | Description |
|---|---|
| ExcelWriteProtection |
Methods
SetPassword(String)
Sets a password for the workbook. This does not encrypt the workbook.
Declaration
public void SetPassword(string Password)
Parameters
| Type | Name | Description |
|---|---|---|
| String | Password | The password. |