(col_name)
return n - 1
Excel column name to number
Excel column name to number
Excel column name to number
def excel_col_number(col_name):
    """Excel column name to number"""
    n = 0
    for c in col_name:
        n = n * 26 + 1 + ord(c) - ord("A")
    return n - 1
def excel_col_number ( col_name ) : n = 0 for c in col_name : n = n * 26 + 1 + ord ( c ) - ord ( "A" ) return n - 1