Back to Devexpress

Protect Workbook Dialog

windowsforms-17128-controls-and-libraries-spreadsheet-visual-elements-dialogs-protect-workbook-dialog.md

latest1.3 KB
Original Source

Protect Workbook Dialog

  • Jan 23, 2019

The Protect Structure and Windows dialog allows the end-user to protect the workbook. Workbook protection prevents end-users from changing a workbook’s structure (by moving, deleting, adding, hiding or displaying a hidden worksheet) or window position (by freezing or unfreezing panes). Using a password is optional.

To invoke this dialog, on the Review tab, in the Changes group, click Protect Workbook.

In a protected workbook, this button displays the “ Unprotect Workbook “ caption, which invokes a simple dialog that prompts for a password or unlocks the workbook if an empty password was set.

For an example on how to provide a Ribbon UI for the SpreadsheetControl, refer to the Getting Started topic.

To programmatically protect a workbook’s structure and windows, use the IWorkbook.Protect method. To remove protection, use the IWorkbook.Unprotect method.