To complement Vlad's answer, here's the reverse operation of ToBase26(int):
static long ToBase10(string str)
{
if (string.IsNullOrWhiteSpace(str)) return 0;
var value = str[0] - 'A' + 1;
return (long) (value * Math.Pow(26, str.Length - 1) +
ToBase10(str.Substring(1, str.Length - 1)));
}