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,6 +324,7 @@ public class ReportUtils { | ||
| 324 | int listIndex = 0; | 324 | int listIndex = 0; |
| 325 | // 取得模板行 | 325 | // 取得模板行 |
| 326 | HSSFRow orgRow = sheet.getRow(index); | 326 | HSSFRow orgRow = sheet.getRow(index); |
| 327 | + HSSFCellStyle style= wb.createCellStyle(); | ||
| 327 | try { | 328 | try { |
| 328 | while (iterator.hasNext()) { | 329 | while (iterator.hasNext()) { |
| 329 | // 取得iterator的对象 | 330 | // 取得iterator的对象 |
| @@ -340,7 +341,7 @@ public class ReportUtils { | @@ -340,7 +341,7 @@ public class ReportUtils { | ||
| 340 | // 创建新行 | 341 | // 创建新行 |
| 341 | newRow = sheet.createRow(index + k++); | 342 | newRow = sheet.createRow(index + k++); |
| 342 | // 把新行的内容换成和模板行一样 | 343 | // 把新行的内容换成和模板行一样 |
| 343 | - copyRow(wb, orgRow, newRow, true, wb.createCellStyle()); | 344 | + copyRow(wb, orgRow, newRow, true,style); |
| 344 | tmpCellNum = newRow.getLastCellNum(); | 345 | tmpCellNum = newRow.getLastCellNum(); |
| 345 | for (int l = 0; l < tmpCellNum; l++) { | 346 | for (int l = 0; l < tmpCellNum; l++) { |
| 346 | cell = newRow.getCell(l); | 347 | cell = newRow.getCell(l); |