Protect Excel Files

Giving information or data to the correct individual is very important in conveying a correct authority. IronXL makes it possible to create password protected spreadsheet as well as each individual WorkSheet.

Accessing

Protected spreadsheet can be opened by providing password as the second parameter to Load method. For example, WorkBook.Load("sample.xlsx", "IronSoftware").

Applying

Use Encrypt method to password protect any spreadsheet. For example, workBook.Encrypt("IronSoftware").

Removing

Removing password from spreadsheet is as simple as setting null to Password field as demonstrated workBook.Password = null. This action can only be done after accessing the workbook. Hence, knowing the original password is a must.

IronXL allows you to Protect and Unprotect any Excel WorkBook and WorkSheet with a single line of C# code.