def xl_cell_to_rowcol(cell_str):
 if (not cell_str):
  return (0, 0)
 match = range_parts.match(cell_str)
 col_str = match.group(2)
 row_str = match.group(4)
 expn = 0
 col = 0
 for char in reversed(col_str):
  col += (((ord(char) - ord('A')) + 1) * (26 ** expn))
  expn += 1
 row = (int(row_str) - 1)
 col -= 1
 return (row, col)

def xl_cell_to_rowcol ( cell_str ) : if ( not cell_str ) : return ( 0 , 0 ) match = range_parts . match ( cell_str ) col_str = match . group ( 2 ) row_str = match . group ( 4 ) expn = 0 col = 0 for char in reversed ( col_str ) : col += ( ( ( ord ( char ) - ord ( 'A' ) ) + 1 ) * ( 26 ** expn ) ) expn += 1 row = ( int ( row_str ) - 1 ) col -= 1 return ( row , col )
convert a cell reference in a1 notation to a zero indexed row and column .