NativeExcel for .Net Developer's Reference

IRangeColumns.InsertMethod

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

[Visual Basic]
SubInsert()
[C#]
voidInsert();
[C++]
voidInsert();
[JScript]
functionInsert();

Example

This example inserts three columns before column five.

[C#]
 book.Worksheets[1].Cells.Columns[5,7].Insert(); 
[VisualBasic]
 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