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

IRangeProvider.GetColumnIndexByName(String) Method

Returns the index of the column with the specified heading in the A1 reference style.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

#Declaration

int GetColumnIndexByName(
    string columnHeading
)

#Parameters

Name Type Description
columnHeading String

The heading of the column whose index should be returned.

#Returns

Type Description
Int32

The column’s index. -1, if an invalid columnHeading is specified.

#Remarks

Use the IRangeProvider.GetColumnNameByIndex method to obtain the column’s name by its index in the ColumnCollection collection.

See Also