def _col_name(c):
    """Convert a zero-based index into an Excel column name."""
    if c < 26:
        return chr(65+c)
    elif c < 26*27:
        return chr(64+c//26) + chr(65+c%26)
    else:
        raise Exception("Too many products")