[]
        
(Showing Draft Content)

C1.Excel.XLColumnCollection.Insert

Insert Method

Insert(int)

Creates a new XLColumn object and inserts it at a specific position in the collection.

Declaration
public XLColumn Insert(int index)
Parameters
Type Name Description
int index

Position where the new item will be inserted.

Returns
Type Description
XLColumn

A reference to the new item.

Insert(int, XLColumn)

Inserts an XLColumn object at a specific position in the collection.

Declaration
public XLColumn Insert(int index, XLColumn col)
Parameters
Type Name Description
int index

Position where the item will be inserted.

XLColumn col

Item that will be inserted.

Returns
Type Description
XLColumn

A reference to the item that was added to the collection.

Remarks
<p>The maximum number of <xref href="C1.Excel.XLColumn" data-throw-if-not-resolved="false"></xref> objects in an <xref href="C1.Excel.XLSheet" data-throw-if-not-resolved="false"></xref> 

is 256. This is a limitation imposed by Excel 2003 and below.

For Excel 2007 and above, the maximum number of XLColumn objects in an XLSheet is 18,278.

Insert(int, XLColumn, XLCell[])

Inserts an XLColumn object at a specific position in the collection.

Declaration
public XLColumn Insert(int index, XLColumn col, XLCell[] cells)
Parameters
Type Name Description
int index

Position where the item will be inserted.

XLColumn col

Item that will be inserted.

XLCell[] cells

Array ot the cells for inserted column.

Returns
Type Description
XLColumn

A reference to the item that was added to the collection.