Skip to main content
Row

WriteProtectionOptions.ClearPassword() Method

Clears the password used to modify a workbook.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

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