import string


def excel_column_name(col):
    """Take in a number and return the excel column name."""
    if isinstance(col, int):
        num = col
        col = ''
        while num > 0:
            num, r = divmod(num-1, 26)
            col = string.ascii_uppercase[r] + col
    return col