Commit 29eb4e701fc7014967514bd25e2d3d4e8f5e38a2
1 parent
f81f2e33
导出行数据太大修改
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/bsth/util/ReportUtils.java
| ... | ... | @@ -324,6 +324,7 @@ public class ReportUtils { |
| 324 | 324 | int listIndex = 0; |
| 325 | 325 | // 取得模板行 |
| 326 | 326 | HSSFRow orgRow = sheet.getRow(index); |
| 327 | + HSSFCellStyle style= wb.createCellStyle(); | |
| 327 | 328 | try { |
| 328 | 329 | while (iterator.hasNext()) { |
| 329 | 330 | // 取得iterator的对象 |
| ... | ... | @@ -340,7 +341,7 @@ public class ReportUtils { |
| 340 | 341 | // 创建新行 |
| 341 | 342 | newRow = sheet.createRow(index + k++); |
| 342 | 343 | // 把新行的内容换成和模板行一样 |
| 343 | - copyRow(wb, orgRow, newRow, true, wb.createCellStyle()); | |
| 344 | + copyRow(wb, orgRow, newRow, true,style); | |
| 344 | 345 | tmpCellNum = newRow.getLastCellNum(); |
| 345 | 346 | for (int l = 0; l < tmpCellNum; l++) { |
| 346 | 347 | cell = newRow.getCell(l); | ... | ... |