Back to Devexpress

IWorkbook.IsProtected Property

officefileapi-devexpress-dot-spreadsheet-dot-iworkbook-a3ad5391.md

latest3.3 KB
Original Source

IWorkbook.IsProtected Property

Gets whether the workbook is protected.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool IsProtected { get; }
vb
ReadOnly Property IsProtected As Boolean

Property Value

TypeDescription
Boolean

true , if the workbook is protected; otherwise, false.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsProtected property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_API_Part02/SpreadsheetActions/ProtectionActions.cs#L23

csharp
workbook.BeginUpdate();
if (!workbook.IsProtected)
    workbook.Protect("password", true, false);

wpf-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/ProtectionActions.cs#L21

csharp
workbook.BeginUpdate();
if (!workbook.IsProtected)
    workbook.Protect("password", true, false);

winforms-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_API_Part02/SpreadsheetActions/ProtectionActions.vb#L26

vb
workbook.BeginUpdate()
If Not workbook.IsProtected Then
    workbook.Protect("password", True, False)

wpf-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/ProtectionActions.vb#L24

vb
workbook.BeginUpdate()
If Not workbook.IsProtected Then
    workbook.Protect("password", True, False)

See Also

IWorkbook Interface

IWorkbook Members

DevExpress.Spreadsheet Namespace