新增[通用数据导入案例]
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user