1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
style = wb.createCellStyle();
style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
style.setBorderRight(HSSFCellStyle.BORDER_THIN);
style.setBorderTop(HSSFCellStyle.BORDER_THIN);
style.setBottomBorderColor(HSSFColor.RED.index);
style.setLeftBorderColor(HSSFColor.RED.index);
style.setRightBorderColor(HSSFColor.RED.index);
style.setTopBorderColor(HSSFColor.RED.index);
(...)
setCellValue(sheet, x, y, "libellé", false, style);
CellRangeAddress cellRange = new CellRangeAddress(x, x, y, y +2);
sheet.addMergedRegion(cellRange); |
Partager