The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

IWorkbook.Protect(String, Boolean, Boolean) Method

Protects the structure and windows of a workbook.

Namespace: DevExpress.Spreadsheet

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

Declaration

void Protect(
    string password,
    bool lockStructure,
    bool lockWindows
)
Sub Protect(
    password As String,
    lockStructure As Boolean,
    lockWindows As Boolean
)
void Protect(
    string password,
    bool lockStructure,
    bool lockWindows
)
Sub Protect(
    password As String,
    lockStructure As Boolean,
    lockWindows As Boolean
)
void Protect(
    string password,
    bool lockStructure,
    bool lockWindows
)
Sub Protect(
    password As String,
    lockStructure As Boolean,
    lockWindows As Boolean
)

Parameters

Name Type Description
password String

A string that specifies a password for the workbook. If an empty string is specified, the workbook can be unprotected without a password.

lockStructure Boolean

true, to lock the structure of the workbook (the position of the sheets); otherwise, false.

lockWindows Boolean

true, to prevent users from changing the position of worksheet windows; otherwise, false.

Parameters

Name Type Description
password String

A string that specifies a password for the workbook. If an empty string is specified, the workbook can be unprotected without a password.

lockStructure Boolean

true, to lock the structure of the workbook (the position of the sheets); otherwise, false.

lockWindows Boolean

true, to prevent users from changing the position of worksheet windows; otherwise, false.

Parameters

Name Type Description
password String

A string that specifies a password for the workbook. If an empty string is specified, the workbook can be unprotected without a password.

lockStructure Boolean

true, to lock the structure of the workbook (the position of the sheets); otherwise, false.

lockWindows Boolean

true, to prevent users from changing the position of worksheet windows; otherwise, false.

Remarks

Locked structure of the workbook prevents users from adding or deleting worksheets, from hiding worksheets or displaying hidden worksheets. Locked windows option prevents users from freezing or unfreezing panes.

See Also