参考 https://blog.csdn.net/wellto/article/details/52293202 XSSFWorkbook xwb = new XSSFWorkbook();
...
XSSFCell cell
...
XSSFFont font1 = xwb.createFont();
font1.setBold(true);
XSSFCellStyle style1 = xwb.createCellStyle();
style1.setFont(font1);
cell.setCellStyle(headerStyle);