使用Apache POI生成单元格内容,给单元格设置了边框,代码如下: // 创建带有四个变量的CellStyle CellStyle cellStyle = workbook.createCellStyle(); cellStyle.setBorderBottom(BorderStyle.THIN); cellStyle.setBorderLeft(BorderStyle.THIN); cellStyle.setBorderRight(BorderStyle.THIN); cellStyle.setBorderT…