New to Telerik Document ProcessingStart a free 30-day trial

Name Converter

Updated on May 11, 2026

The NameConverter is a static class that provides methods for name conversion (e.g. converting cell names to indexes and vice versa).

Methods

The following table lists the available methods:

MethodDescription
ConvertRowIndexToNameConverts the row index to name.
ConvertRowNameToIndexConverts the row name to index.
ConvertColumnIndexToNameConverts the column index to name.
ConvertColumnNameToIndexConverts the column name to index.
ConvertCellIndexToNameConverts the cell index to name.
TryConvertNamesToCellReferenceRangeExpressionTries to convert the cell ranges names to cell reference ranges.
ConvertCellReferenceToNameConverts the cell reference to name.
ConvertCellRangeToNameConverts the cell range to a name.
TryConvertNameToCellRangeTries to convert the name to a cell range.
ConvertCellIndexesToNameConverts the cell indexes to a name.
ConvertCellNameToIndexConverts the cell name to a cell index.
TryConvertCellNameToIndexTries to convert the cell name to index.
IsValidA1CellNameDetermines whether the name of the cell is valid.

Convert Row Index to Name

ConvertRowIndexToName method converts the row index to name.

Example 1:

C#
int rowIndex = 0;
string rowName = NameConverter.ConvertRowIndexToName(rowIndex);

Convert Row Name to Index

ConvertRowNameToIndex method converts the row name to index.

Example 2:

C#
string rowName = "1";
int rowIndex = NameConverter.ConvertRowNameToIndex(rowName);

Convert Column Index to Name

ConvertColumnIndexToName method converts the column index to name.

Example 3:

C#
int columnIndex = 0;
string columnName = NameConverter.ConvertColumnIndexToName(columnIndex);

Convert Column Name to Index

ConvertColumnNameToIndex converts the column name to index.

Example 4:

C#
string columnName = "A";
int columnIndex = NameConverter.ConvertColumnNameToIndex(columnName);

Convert Cell Index to Name

ConvertCellIndexToName method converts the cell index to name. This method exposes two overloads.

Example 5: first overload

C#
CellIndex cellIndex = new CellIndex(rowIndex: 0, columnIndex: 0);
string cellName = NameConverter.ConvertCellIndexToName(cellIndex);

Example 5: second overload

C#
string cellName = NameConverter.ConvertCellIndexToName(rowIndex: 0, columnIndex: 0);

Try Convert Names to Cell Reference Range Expression

TryConvertNamesToCellReferenceRangeExpression method tries to convert the cell ranges names to cell reference ranges.

Example 6:

C#
string cellRangesName = "A1:F11";
Worksheet worksheet = workbook.ActiveWorksheet;
int rowIndex = 0;
int columnIndex = 0;
CellReferenceRangeExpression cellReferenceRangeExpression;
bool isConversionToCellReferenceRangeExpressionSuccessful = NameConverter.TryConvertNamesToCellReferenceRangeExpression(cellRangesName, worksheet, rowIndex, columnIndex, out cellReferenceRangeExpression);

Convert Cell Reference to Name

ConvertCellReferenceToName method converts the cell reference to name.

Example 7:

C#
CellReference fromCellReference = cellReferenceRangeExpression.CellReferenceRange.FromCellReference;
string fromCellReferenceName = NameConverter.ConvertCellReferenceToName(fromCellReference);

CellReference toCellReference = cellReferenceRangeExpression.CellReferenceRange.ToCellReference;
string toCellReferenceName = NameConverter.ConvertCellReferenceToName(toCellReference);

Convert Cell Range to Name

ConvertCellRangeToName method converts the cell range to a name.

Example 8:

C#
CellIndex fromIndex = new CellIndex(rowIndex: 0, columnIndex: 0);
CellIndex toIndex = new CellIndex(rowIndex: 10, columnIndex: 5);
string cellRangeName = NameConverter.ConvertCellRangeToName(fromIndex, toIndex);

Try Convert Name to Cell Range

TryConvertNameToCellRange method converts the name to a cell range.

Example 9:

C#
CellIndex fromIndex = new CellIndex(rowIndex: 0, columnIndex: 0);
CellIndex toIndex = new CellIndex(rowIndex: 10, columnIndex: 5);
string cellRangeName = NameConverter.ConvertCellRangeToName(fromIndex, toIndex);

CellRange cellRange;
bool result = NameConverter.TryConvertCellRangeNameToCellRange(cellRangeName, out cellRange);

Convert Cell Indexes to Name

ConvertCellIndexesToName method converts the cell indexes to a name.

Example 10:

C#
string cellRangeName = NameConverter.ConvertCellIndexesToName(fromRowIndex: 0, fromColumnIndex: 0, toRowIndex: 10, toColumnIndex: 5);

Convert Cell Name to Index

ConvertCellNameToIndex method converts the cell name to a cell index. This method exposes two overloads.

Example 11: first overload

C#
string cellName = "A1";
int rowIndex;
int columnIndex;
NameConverter.ConvertCellNameToIndex(cellName, out rowIndex, out columnIndex);

Example 11: second overload

C#
string cellName = "A1";
int rowIndex;
bool isRowAbsolute;
int columnIndex;
bool isColumnAbsolute;
NameConverter.ConvertCellNameToIndex(cellName, out isRowAbsolute, out rowIndex, out isColumnAbsolute, out columnIndex);

Try Convert Cell Name to Index

TryConvertCellNameToIndex method tries to convert the cell name to index. This method exposes two overloads.

Example 12: first overload

C#
string cellName = "A1";
int rowIndex;
int columnIndex;
bool isConversionSuccessful = NameConverter.TryConvertCellNameToIndex(cellName, out rowIndex, out columnIndex);

Example 12: second overload

C#
string cellName = "A1";
int rowIndex;
bool isRowAbsolute;
int columnIndex;
bool isColumnAbsolute;
bool isConversionSuccessful = NameConverter.TryConvertCellNameToIndex(cellName, out isRowAbsolute, out rowIndex, out isColumnAbsolute, out columnIndex);

Is Valid A1 Cell Name

IsValidA1CellName method determines whether the name of the cell is valid.

Example 13:

C#
string cellName = "B2";
bool isValidCellName = NameConverter.IsValidA1CellName(cellName);

See Also