Browse Source

Merge branch '2.1.x' of https://github.com/alibaba/easyexcel into 2.1.x

2.1.x
Jiaju Zhuang 5 years ago
parent
commit
27f4bc83bd
  1. 6
      src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java

6
src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java

@ -46,9 +46,11 @@ public class ExcelWriteAddExecutor extends AbstractExcelWriteExecutor {
} }
// BeanMap is out of order,so use fieldList // BeanMap is out of order,so use fieldList
List<Field> fieldList = new ArrayList<Field>(); List<Field> fieldList = new ArrayList<Field>();
for (int relativeRowIndex = 0; relativeRowIndex < data.size(); relativeRowIndex++) { int relativeRowIndex=0;
for(Object oneRowData : data){
int n = relativeRowIndex + newRowIndex; int n = relativeRowIndex + newRowIndex;
addOneRowOfDataToExcel(data.get(relativeRowIndex), n, relativeRowIndex, fieldList); addOneRowOfDataToExcel(oneRowData, n, relativeRowIndex, fieldList);
relativeRowIndex++;
} }
} }

Loading…
Cancel
Save