Does any one have algorithm or logic to Convert A to 1 ,B to 2, ... ,Z to 26 and then ,AA to 27, AB to 28 etc.
In other words, converting a column index into the col
Same problem, different language: PHP.
function charToInt($char) { $array = array_flip(range(a, z)); return $array[$char] + 1; } echo charToInt('c'); outputs: 3