有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java的XSSFCellStyle。纯色_前景“,”XSSFCellStyle。将“右”和“HSSFCellStyle”对齐。POI 3.17中的BORDER_MEDIUM替代方案

我正在使用poi-3.6,我需要将源文件更新为poi 3.17。我需要知道你的风格。纯色_前景“,”XSSFCellStyle。将“右”和“HSSFCellStyle”对齐。poi 3.17中的BORDER_MEDIUM替代方案

    CellStyle fontBoldedCell = ExcelCommon.getFontBoldedCell(workbook);
    Sheet sheet = workbook.getSheetAt(0);

    row = sheet.createRow(currrow++);
    cell = row.createCell(0);
    cell.setCellValue("Total Records");
    cell = row.createCell(1);
    cell.setCellValue(count);
    cell.setCellStyle(ExcelCommon.getAligneCell(workbook, null, XSSFCellStyle.ALIGN_RIGHT));

    Font font = workbook.createFont();
    font.setBold(true);
    CellStyle style = workbook.createCellStyle();
    style.setFont(font);
    style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
    style.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND);
    style.setBorderTop(BorderStyle.THIN);
    style.setBorderRight(BorderStyle.THIN);
    style.setBorderLeft(BorderStyle.THIN);
    style.setBorderBottom(BorderStyle.THIN);
    return style;    

    CellStyle style = workbook.createCellStyle();
    Font font = workbook.createFont();
    style.setFont(font);
    style.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);

共 (0) 个答案