Class ExcelWriteProtection
- Namespace
- OfficeOpenXml
- Assembly
- EPPlus.dll
File sharing settings for the workbook.
public class ExcelWriteProtection : XmlHelper
- Inheritance
-
ExcelWriteProtection
- Inherited Members
Properties
IsReadOnly
If the workbook is set to readonly and has a password set.
public bool IsReadOnly { get; }
Property Value
ReadOnlyRecommended
If the author recommends that you open the workbook in read-only mode.
public bool ReadOnlyRecommended { get; set; }
Property Value
UserName
The name of the person enforcing the write protection.
public string UserName { get; set; }
Property Value
Methods
RemoveReadOnly()
Remove any write protection set on the workbook
public void RemoveReadOnly()
SetReadOnly(string, string)
Writes protectes the workbook with a password. EPPlus uses SHA-512 as hash algorithm with a spin count of 100000.
public void SetReadOnly(string userName, string password)