import click


def read_excel_data(ctx):
    """Reads excel data from data directory

    Args:
        ctx (Context): Context object

    Returns:
        list: Excel data list

    Raises:
        click.ClickException: If no Excel data found
    """
    excel_data_list = ctx.obj.svc_importer.read_excel_data()

    if not bool(excel_data_list):
        raise click.ClickException("No Excel data found")

    click.echo("Excel data list: {}".format(excel_data_list))

    return excel_data_list