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
Insert and Delete a Column
 
Insert a Column
Code Sample
[C#]
 
//Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook();
 
Worksheet worksheet = workbook.Worksheets[0];
 
//Insert a row into the worksheet
worksheet.InsertColumn(2);
 
//Save the Excel file
workbook.Save("output.xls");
 
[VB.NET]
 
'Create a Workbook object
Dim workbook As Workbook = New Workbook()
 
'Get the first worksheet
Dim worksheet As XlsWorksheet= workbook.Worksheets(0)
 
'Insert a column into the worksheet
worksheet.InsertColumn (2);
 
'Save the Excel file
workbook.Save("book1.xls");
 
Delete a Column
Code Sample
[C#]
 
//Create a Workbook object
XlsWorkbook workbook = new XlsWorkbook();
 
Worksheet worksheet = workbook.Worksheets[0];
 
//Delete a row into the worksheet
worksheet.DeleteColumn(2);
 
//Save the Excel file
workbook.Save("book1.xls");
 
[VB.NET]
 
'Create a Workbook object
Dim workbook As XlsWorkbook = New XlsWorkbook ()
 
'Get the first worksheet
Dim worksheet As XlsWorksheet= workbook.Worksheets(0)
 
'Delete a column into the worksheet
worksheet.DeleteColumn (2);
 
'Save the Excel file
workbook.Save("book1.xls");