Commit e5a05a84 authored by yanzg's avatar yanzg

合并空行BUG

parent 3540e3ae
...@@ -59,6 +59,10 @@ public class ExcelConsole<T extends Object> implements DbRow<T> { ...@@ -59,6 +59,10 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
* 行号 * 行号
*/ */
private int rowIndex; private int rowIndex;
/**
* 行数据
*/
private int rowData;
/** /**
* 合并列表組 * 合并列表組
...@@ -309,6 +313,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> { ...@@ -309,6 +313,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
} }
rowIndex++; rowIndex++;
rowData++;
if (this.rowIndex % 100 == 0) { if (this.rowIndex % 100 == 0) {
FileHelper.writeFile(new File(this.getFileNameRow()), StringHelper.toString(this.rowIndex), "utf-8"); FileHelper.writeFile(new File(this.getFileNameRow()), StringHelper.toString(this.rowIndex), "utf-8");
...@@ -363,6 +368,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> { ...@@ -363,6 +368,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
return this; return this;
} }
// 合并数据配置 // 合并数据配置
if(this.rowData > 0){
int columnPos = 0; int columnPos = 0;
for (ExportColumn column : this.config.getColumns()) { for (ExportColumn column : this.config.getColumns()) {
mergerColumn(column, columnPos, true); mergerColumn(column, columnPos, true);
...@@ -376,6 +382,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> { ...@@ -376,6 +382,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
} }
columnPos++; columnPos++;
} }
}
try { try {
String fileNameTemp = this.getFileNameTemp(); String fileNameTemp = this.getFileNameTemp();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment