Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ColumnCollection.Remove(String) Method

Removes a column with the specified heading from the worksheet.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

void Remove(
    string columnHeading
)

#Parameters

Name Type Description
columnHeading String

The heading of the column to remove.

#Remarks

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

// Remove the column D from the worksheet.
worksheet.Columns.Remove("D");

Note

The number of columns in a worksheet is unchanged - 16,384. When you delete columns, other columns in the worksheet are shifted to the left and the equivalent number of new columns is automatically added to the end of the worksheet’s column collection.

See how to delete rows and columns from a worksheet.

If you need to delete the cell content or format settings from columns, use the Worksheet object’s Clear* methods.

See how to clear cells of content, formatting, hyperlinks and comments.

Use the Column.Visible property or ColumnCollection.Hide methods to hide columns in a worksheet.

See how to hide a row or column.

See Also