def convert_column_args(method):
 def column_wrapper(self, *args, **kwargs):
  try:
   if len(args):
    int(args[0])
  except ValueError:
   (cell_1, cell_2) = [(col + '1') for col in args[0].split(':')]
   (_, col_1) = xl_cell_to_rowcol(cell_1)
   (_, col_2) = xl_cell_to_rowcol(cell_2)
   new_args = [col_1, col_2]
   new_args.extend(args[1:])
   args = new_args
  return method(self, *args, **kwargs)
 return column_wrapper

def convert_column_args ( method ) : def column_wrapper ( self , * args , ** kwargs ) : try : if len ( args ) : int ( args [ 0 ] ) except ValueError : ( cell_1 , cell_2 ) = [ ( col + '1' ) for col in args [ 0 ] . split ( ':' ) ] ( _ , col_1 ) = xl_cell_to_rowcol ( cell_1 ) ( _ , col_2 ) = xl_cell_to_rowcol ( cell_2 ) new_args = [ col_1 , col_2 ] new_args . extend ( args [ 1 : ] ) args = new_args return method ( self , * args , ** kwargs ) return column_wrapper
decorator function to convert a1 notation in columns method calls to the default row/col notation .