Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
Row

ColumnCollection.Insert(String, Int32) Method

Inserts multiple columns into the worksheet.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll

Declaration

void Insert(
    string columnHeading,
    int count
)

Parameters

Name Type Description
columnHeading String

The heading of the first column to insert.

count Int32

The number of inserted columns.

Remarks

The method’s columnHeading parameter requires a column heading in the A1 reference style.

// Insert two columns starting with the column D.
worksheet.Columns.Insert("D", 2);

Note

The number of columns in a worksheet is unchanged - 16,384. When you add new columns, other columns in the worksheet are shifted to the right, and the equivalent number of columns at the end are automatically removed from the worksheet.

See how add new rows and columns to a worksheet.

See Also