diff --git a/src/main/java/com/nis/util/excel/ImportExcel.java b/src/main/java/com/nis/util/excel/ImportExcel.java index e9698f0b8..a1318e1bb 100644 --- a/src/main/java/com/nis/util/excel/ImportExcel.java +++ b/src/main/java/com/nis/util/excel/ImportExcel.java @@ -346,7 +346,7 @@ public class ImportExcel { //log.debug("Import column count:"+annotationList.size()); // Get excel data List dataList = Lists.newArrayList(); - Row header = this.getRow(headerNum); + /*Row header = this.getRow(headerNum); List annotationListCopy=Lists.newArrayList(); for(int i=header.getFirstCellNum();i<=header.getLastCellNum();i++) { Object value=this.getCellValue(header, i); @@ -398,21 +398,21 @@ public class ImportExcel { if(!has) { throw new ServiceException(props.getProperty("template_error")); } - } + }*/ // Field sorting - Collections.sort(annotationListCopy, new Comparator() { + Collections.sort(annotationList, new Comparator() { public int compare(Object[] o1, Object[] o2) { return new Integer(((ExcelField)o1[0]).sort()).compareTo( new Integer(((ExcelField)o2[0]).sort())); }; }); - annotationList.clear(); + //annotationList.clear(); for (int i = this.getDataRowNum(); i < this.getLastDataRowNum(); i++) { E e = (E)cls.newInstance(); int column = 0; Row row = this.getRow(i); StringBuilder sb = new StringBuilder(); - for (Object[] os : annotationListCopy){ + for (Object[] os : annotationList){ Object val = this.getCellValue(row, column++); if (val != null){ ExcelField ef = (ExcelField)os[0];