News & Releases

Minimize
Nasosoft Components for .NET v5.4.0 Released - Friday, September 06, 2013

Nasosoft Component for .NET v5.4.0 has released with many improvements.

What's new

Nasosoft Excel for .NET   
  • Bug Fixes

 

 

Nasosoft Excel for .NET

   Minimize
Protect and Unprotect an Excel File
 
Protect Content
 
Code Samples 
[C#]
 
 
//Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook();
 
//Protect the workbook content with password
Workbook.Protect(XlsProtectionType.Content, “password”);
 
workbook.Save(fstream);
 
[VB.NET]
 
 
'Create a Workbook object
Dim workbook As XlsWorkbook = New XlsWorkbook()
 
'Protect the workbook content with password
Workbook.Protect(XlsProtectionType.Content, “password”)
 
workbook.Save("C:\book1.xls")
 
 
Protect Window
 
Code Samples
[C#]
 
 
//Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook();
 
//Protect the workbook content with password
Workbook.Protect(XlsProtectionType.Window, “password”);
 
workbook.Save(fstream);
 
[VB.NET]
 
 
'Create a Workbook object
Dim workbook As XlsWorkbook = New XlsWorkbook()
 
'Protect the workbook content with password
Workbook.Protect(XlsProtectionType.Window, “password”)
 
workbook.Save("C:\book1.xls")
 
 
Unprotect
Code Samples 
[C#]
 
 
//Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook("C:\book1.xls");
 
//UnProtect the workbook content with password
Workbook.Unprotect(“password”);
 
workbook.Save("C:\book2.xls");
 
[VB.NET]
 
 
'Create a Workbook object
Dim workbook As XlsWorkbook = New XlsWorkbook("C:\book1.xls")
 
'UnProtect the workbook content with password
Workbook.Unprotect(“password”)
 
workbook.Save("C:\book2.xls")