Xceed Workbooks for .NET v1.4 Documentation
ConvertLetterToNumber Method


Xceed.Workbooks.NET Assembly > Xceed.Workbooks.NET Namespace > CellHelper Class : ConvertLetterToNumber Method

The letter or letters that will be converted.

This must correspond to one or more letters used by MS Excel to identify a Column.

Converts letters into a numerical value.
Syntax
'Declaration

 

Public Shared Function ConvertLetterToNumber( _

   ByVal letter As String _

) As Integer
'Usage

 

Dim letter As String

Dim value As Integer

 

value = CellHelper.ConvertLetterToNumber(letter)
public static int ConvertLetterToNumber( 

   string letter

)

Parameters

letter

The letter or letters that will be converted.

This must correspond to one or more letters used by MS Excel to identify a Column.

Return Value

The number corresponding to the chosen letters.
Remarks
The letter and number correspondence is determined as follows: "A" is 0, "B" is 1, "C" is 2 and so on. Therefore, "AA" will correspond to "26", "AB" to 27, "AC" to 28 and so forth.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CellHelper Class
CellHelper Members