Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def col_to_int(col):
- """Converts excel COL to INT (zero indexed)"""
- if len(col) == 1:
- return ord(col.upper()) - ord('A')
- if len(col) == 2:
- n_alphabet = 26
- return (col_to_int(col[0])+1)*n_alphabet+col_to_int(col[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement