private static List<XSSFCellStyle> createContentCellStyle(XSSFWorkbook workbook,
            List<Pair<Field, ExcelField>> fieldMetas,
            Function<ExcelField, Style> styleGenerator,
            Function<ExcelField, Font> fontGenerator) {
        return fieldMetas.stream().map(fieldMeta -> {
            XSSFCellStyle style = workbook.createCellStyle();
            ExcelField excelField = fieldMeta.getRight();
            Style excelStyle = styleGenerator.apply(excelField);
            Font excelFont = fontGenerator.apply(excelField);
            // Set foreground color
            style.setFillForegroundColor(excelStyle.bgColor().getIndex());
            style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
            // Set font
            XSSFFont font = workbook.createFont();
            font.setFontName(excelFont.name());
            font.setColor(excelFont.color().getIndex());
            font.setFontHeightInPoints(excelFont.size());
            font.setBold(excelFont.bold());
            font.setItalic(excelFont.italic());
            style.setFont(font);
            // Set border
            BorderStyle borderBottom = excelStyle.bottomBorderStyle();
            BorderStyle borderTop = excelStyle.topBorderStyle();
            BorderStyle borderLeft = excelStyle.leftBorderStyle();
            BorderStyle borderRight = excelStyle.rightBorderStyle();
            BorderStyle borderAll = excelStyle.allBorderStyle();
            if (borderAll != BorderStyle.NONE) {
                borderBottom = borderTop = borderLeft = borderRight = borderAll;
            }
            style.setBorderBottom(borderBottom);
            style.setBorderTop(borderTop);
            style.setBorderLeft(borderLeft);
            style.setBorderRight(borderRight);
            // Set border color
            IndexedColors bottomBorderColor = excelStyle.bottomBorderColor();
            IndexedColors topBorderColor = excelStyle.topBorderColor();
            IndexedColors leftBorderColor = excelStyle.leftBorderColor();
            IndexedColors rightBorderColor = excelStyle.rightBorderColor();
            IndexedColors allBorderColor = excelStyle.allBorderColor();
            if (allBorderColor != IndexedColors.BLACK) {
                bottomBorderColor = topBorderColor = leftBorderColor = rightBorderColor = allBorderColor;
            }
            style.setBottomBorderColor(bottomBorderColor.getIndex());
            style.setTopBorderColor(topBorderColor.getIndex());
            style.setLeftBorderColor(leftBorderColor.getIndex());
            style.setRightBorderColor(rightBorderColor.getIndex());
            return style;
        }).collect(Collectors.toList());

    }
Fills the output stream with the provided class meta.
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/tool/excel/ExcelTool.java