public int bulkInsert(MultipartFile file) {
InputStream inputStream = null;
try {
inputStream = file.getInputStream();
String name = file.getOriginalFilename().toLowerCase();
ExcelReader reader = new ExcelReader(inputStream, name.endsWith(".xls") ? ExcelTypeEnum.XLS : ExcelTypeEnum.XLSX, null,
new AnalysisEventListener<List
-
" data:" + object+"\n"); }
@Override public void doAfterAllAnalysed(AnalysisContext context) { } }); reader.read(); } catch (Exception e) { e.printStackTrace(); } finally { try { inputStream.close(); } catch (IOException e) { e.printStackTrace(); } } return 0;
}