NativeExcel for .Net Developer's Reference

IRangeColumns.Insert Method 

Inserts a cell or a range of cells into the worksheet and shifts other cells right to make space.

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

Example

This example inserts three columns before column five.

[C#]
 book.Worksheets[1].Cells.Columns[5,7].Insert(); 
[Visual Basic]
 book.Worksheets(1).Cells.Columns(5,7).Insert()
[C++]
 book->Worksheets->Item[1]->Cells->Columns->Item[5,7]->Insert(); 

See Also

IRangeColumns Interface | NativeExcel Namespace | Delete Method