Parse Cell Location String into Row & Column
c#, excel
Solution
string col = "AB21";
int startIndex = col.IndexOfAny("0123456789".ToCharArray());
string column = col.Substring(0, startIndex);
int row = Int32.Parse(col.Substring(startIndex));
Of course, you should guarantee that input string will be in correct format.
Problem
i have `string col= "AB21"` which is an excel cell location. I would like to parse it as `string column = "AB"` & `int row = 21;` How can i do that?