Given a columns\' index, how can you get an Excel column name?
The problem is trickier than it sounds because it\'s not just base-26. The columns
Here's Joel's awesome code modified to work with zero-based column indexes and without the char array.
Public Shared Function GetExcelColumn(ByVal index As Integer) As String
Dim quotient As Integer = index \ 26 ''//Truncate
If quotient > 0 Then
Return GetExcelColumn(quotient - 1) & Chr((index Mod 26) + 64).ToString
Else
Return Chr(index + 64).ToString
End If
End Function