import configparser


def parse_xlvals_file(filepath):
    """
    Since .xlvals files are not true .ini files, we:
    - read the file contents into a string
    - prepend '[default]' to make in a valid .ini file
    - parse it as a config file
    """
    data = ""
    with open(filepath) as xlvals:
        data = '[default]\n{}'.format(xlvals.read())

    config = configparser.ConfigParser()
    config.read_string(data)
    return config