class ExcelChartSheetDefault implements ExcelChartSheet {

    @Override
    public void writeCell(final Object value, final Row row, final int column) {
        // try to determine the cell type based on the object value
        // if nothing matches then use 'CELL_TYPE_STRING' as type and call the
        // object toString() function.
        // * don't create any cell if the value is null (Cell.CELL_TYPE_BLANK)
        // * do nothing if we have an empty List/Set instead of display empty
        // brackets like []
        if (value != null && !((value instanceof List || value instanceof Set) && ((Collection) value).isEmpty())) {
            final Cell cell;
            if (value instanceof String) {
                cell = row.createCell(column, CellType.STRING);
                cell.setCellValue((String) value);
            } else {
                if (value instanceof Integer) {
                    cell = row.createCell(column, CellType.NUMERIC);
                    cell.setCellValue((Integer) value);
                } else {
                    if (value instanceof Number) {
                        cell = row.createCell(column, CellType.NUMERIC);
                        cell.setCellValue(((Number) value).doubleValue());
                    } else {
                        if (value instanceof Boolean) {
                            cell = row.createCell(column, CellType.BOOLEAN);
                            cell.setCellValue(((Boolean) value) ? "Yes" : "No");
                        } else {
                            if (value instanceof Date) {
                                final SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
                                cell = row.createCell(column, CellType.STRING);
                                cell.setCellValue(sdf.format((Date) value));
                            } else {
                                cell = row.createCell(column, CellType.STRING);
                                cell.setCellValue(value.toString());
                            }
                        }
                    }
                }
            }

            // determine the style of the row based on it's index
            if (row.getRowNum() < 1) {
                cell.setCellStyle(headerStyleCell);
            } else {
                cell.setCellStyle(dataStyleCell);
            }
        } else {
            // create a Cell.CELL_TYPE_BLANK
            row.createCell(column);
        }
    }

    public  ExcelChartSheetDefault(final Workbook workbook, final String excelSheetName);

}