NativeExcel for .Net Developer's Reference

IRangeColumns.Delete Method 

Deletes a cell or a range of cells from the worksheet and shifts other cells left to replace deleted cells.

[Visual Basic]
Sub Delete()
[C#]
void Delete();
[C++]
void Delete();
[JScript]
function Delete();

Example

This example deletes columns one through five from sheet one and shifts other cells left.

[C#]
 book.Worksheets[1].Cells["A1:F1"].EntireColumn.Delete(); 
[Visual Basic]
 book.Worksheets(1).Cells["A1:F1"].EntireColumn.Delete()
[C++]
 book->Worksheets->Item[1]->Cells->Item[S"A1:F1"]->EntireColumn->Delete(); 

See Also

IRangeColumns Interface | NativeExcel Namespace | Insert Method