def ColumnToIndex ( col ) : ndx = 0 for c in col : ndx = ndx * 26 + ord ( c . upper ( ) ) - 64 return ndx
how to get row an col indexes sing enumerate python
convert column to index . Eg : ConvertInIndex ( AB ) = 28
def ColumnToIndex (col):
        """convert column to index. Eg: ConvertInIndex("AB") = 28"""
        ndx = 0
        for c in col:
                ndx = ndx * 26 + ord(c.upper()) - 64
        return ndx