Search code examples
excelspreadsheetgear

Protecting Excel work book using SpreadsheetGear in C#


What is best possible way to protect Excel work book(read only) and work sheets without using

password using SpreadsheetGear dll in c#?


Solution

  • Setting IWorksheet.ProtectContents to true protects a worksheet without attaching a password to it.

    SpreadsheetGear 2009 does not support workbook protection / passwords. SpreadsheetGear 2010 does support workbook protection with a new IWorkbook.Protect(...) method, and also supports reading and writing password protected workbooks. We intend to release SpreadsheetGear 2010 this summer.