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
Hide and Display a Worksheet
 
Hide a Worksheet
Code Sample
[C#]
 
// Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook ();
 
//Add a new worksheet
workbook.Worksheets.Add("newsheet");
 
//Get the first worksheet
XlsWorksheet worksheet = workbook.Worksheets[0];
 
//Hide the sheet
worksheet.Visibility = XlsVisibility.Hidden; 
 
//Save the Excel file
workbook.Save("C:\book1.xls")
 
[VB.NET]
 
'Instantiating a Workbook object
Dim workbook As XlsWorkbook = New XlsWorkbook ()
 
'Add a new worksheet
workbook.Worksheets.Add("newsheet")
 
'Get the first worksheet
Dim worksheet As XlsWorksheet = workbook.Worksheets(0)
 
'Hide the sheet
worksheet.Visibility = XlsVisibility.Hidden;
 
'Save the Excel file
workbook.Save("C:\book1.xls")
 
Display a Worksheet
Code Sample
[C#]
 
//Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook();
 
//Add a new worksheet
workbook.Worksheets.Add("newsheet");
 
//Get the first worksheet
XlsWorksheet worksheet = workbook.Worksheets[0];
 
//Show the sheet
worksheet.Visibility = XlsVisibility.Visible; 
 
//Save the Excel file
workbook.Save("C:\book1.xls")
 
[VB.NET]
 
'Create a Workbook object
Dim workbook As XlsWorkbook = New XlsWorkbook()
 
'Add a new worksheet
workbook.Worksheets.Add("newsheet")
 
'Get the first worksheet
Dim worksheet As XlsWorksheet= workbook.Worksheets(0)
 
'Show the sheet
worksheet.Visibility = XlsVisibility.Visible;
 
'Save the Excel file
workbook.Save("C:\book1.xls")