新增[通用数据导入案例]

This commit is contained in:
2019-06-18 23:17:04 +08:00
parent 73ebd2ceba
commit bf9860f3bd
4 changed files with 83 additions and 21 deletions

View File

@@ -294,6 +294,9 @@ public class ExcelKit {
Map map = new HashMap();
for (int j = 0; j < cellNum && j < fields.length; j++) {
if (fields[j] == null || "".equals(fields[j])) {
continue;
}
Cell cell = row.getCell(j);
if (cell == null) {
map.put(fields[j], "");
@@ -385,23 +388,6 @@ public class ExcelKit {
e.printStackTrace();
}
return null;
/*Workbook wk;
FileInputStream fis = new FileInputStream(file);
try {
wk = new HSSFWorkbook(fis);//if excel version 2007+ will throws OfficeXmlFileException
} catch (OfficeXmlFileException e) {
wk = new SXSSFWorkbook(new XSSFWorkbook(fis));
} finally {
if (fis != null) {
try {
fis.close();
} catch (Exception e) {
//e.printStackTrace();
}
}
}
return wk;*/
}
//dev