I\'ve been looking around for a while now and cannot seem to find out how to do this. I\'ve got an excel sheet, which I\'m reading using OpenXML. Now the normal thing would
Small is beautifull
int ColumnIndex(string reference) { int ci=0; reference=reference.ToUpper(); for (int ix = 0; ix < reference.Length && reference[ix] >= 'A';ix++ ) ci = (ci * 26) + ((int)reference[ix] - 64); return ci; }