• Fluent
  • Fluent Dark
  • Bootstrap v5
  • Bootstrap v5 Dark
  • Tailwind CSS
  • Tailwind CSS Dark
  • Material
  • Bootstrap v4
  • High Contrast
Theme Selection
Mode Selection
*Translated by Google Translator.

Example of Workbook Protection in ASP.NET MVC Excel (XlsIO) Library

This sample demonstrates how to set protection for a workbook using Excel (XlsIO) Library.

Click the "Protect Workbook" button to view the protected Excel document and "Unprotect Workbook" to view the unprotected Excel document. Please note that the Microsoft Excel viewer or Microsoft Excel is required to view the Excel document.

Save As :  

You can lock the structure of a workbook, which prevents users from adding or deleting worksheets or from displaying hidden worksheets. You can also prevent users from changing the size or position of worksheet windows. Workbook structure and window protection apply to the entire workbook.


  • Protecting a workbook with a password
  • Protecting a window or structure from modification
  • Removing protection of a workbook with a password

To protect a workbook, point to Protection on the Tools menu, and then click Protect Workbook. You can choose which elements you want to protect (workbook structure, windows, or both) by selecting or clearing the corresponding check boxes.