def rowcol_to_a1(row, col):
 row = int(row)
 col = int(col)
 if ((row < 1) or (col < 1)):
  raise IncorrectCellLabel(('(%s, %s)' % (row, col)))
 div = col
 column_label = ''
 while div:
  (div, mod) = divmod(div, 26)
  if (mod == 0):
   mod = 26
   div -= 1
  column_label = (chr((mod + MAGIC_NUMBER)) + column_label)
 label = ('%s%s' % (column_label, row))
 return label

def rowcol_to_a1 ( row , col ) : row = int ( row ) col = int ( col ) if ( ( row < 1 ) or ( col < 1 ) ) : raise IncorrectCellLabel ( ( '(%s, %s)' % ( row , col ) ) ) div = col column_label = '' while div : ( div , mod ) = divmod ( div , 26 ) if ( mod == 0 ) : mod = 26 div -= 1 column_label = ( chr ( ( mod + MAGIC_NUMBER ) ) + column_label ) label = ( '%s%s' % ( column_label , row ) ) return label
translates a row and column cell address to a1 notation .