RegionUtil.setBorderLeft(1, cellRangeAddress, sheet, wb); RegionUtil.setBorderBottom(1, cellRangeAddress, sheet, wb); RegionUtil.setBorderRight(1, cellRangeAddress, sheet, wb); RegionUtil.setBorderTop(1, cellRangeAddress, sheet, wb); 上面是加边框的核心代码,为单元格