Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
Row

WriteProtectionOptions.ClearPassword() Method

Clears the password used to modify a workbook.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll

Declaration

void ClearPassword()

Remarks

The following example removes write-protection from a workbook:

using (Workbook workbook = new Workbook())
{
    workbook.LoadDocument("WriteProtectedDocument.xlsx");
    RemoveWriteProtection(workbook);
}
// ...

private void RemoveWriteProtection(Workbook workbook)
{
    if (workbook.DocumentSettings.WriteProtection.IsPasswordProtected)
        workbook.DocumentSettings.WriteProtection.ClearPassword();
}
See Also