NativeExcel for .Net Developer's Reference

IRangeColumn.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 column five from sheet one and shifts other cells left.

[C#]
 book.Worksheets[1].UsedRange.Columns[5].Delete(); 
[Visual Basic]
 book.Worksheets(1).UsedRange.Columns(5).Delete()
[C++]
 book->Worksheets->Item[1]->UsedRange->Columns->Item[5]->Delete(); 

See Also

IRangeColumn Interface | NativeExcel Namespace | Insert Method