class ExcelFileDefault implements ExcelFile {

    @Override
    public Workbook createWorkbook() {
        // don't do anything if the list of objects is empty, just display the error message.
        if (objects.isEmpty()) {
            final ExcelSheet excelSheet = new ExcelSheetDefault(this.workbook, this.translateService, "no data");
            excelSheet.emptySheet();
        } else {
            final Class clazz = this.objects.get(0).getClass();
            final ExcelSheet excelSheet = new ExcelSheetDefault(this.workbook, this.translateService,
                    clazz.getSimpleName().toLowerCase());
            excelSheet.writeSheet(clazz, objects);
        }

        return workbook;
    }

    public  ExcelFileDefault(final List<Object> objects, final TranslateService translateService);

}