Java poi导入Excel
2021-09-23 11:13
标签:ber original tle common rop ima color last list public MessageTo importPartyMember(MultipartFile file) { try { InputStream is = file.getInputStream(); Workbook hssfWorkbook = null; if (file.getOriginalFilename().endsWith("xlsx")){ hssfWorkbook = new XSSFWorkbook(is);//Excel 2007 }else if (file.getOriginalFilename().endsWith("xls")){ hssfWorkbook = new HSSFWorkbook(is);//Excel 2003 } Sheet hssfSheet = hssfWorkbook.getSheetAt(0); String titleformat = "姓名,性别,出生年月,身份证,学历,电子邮箱,入党时间,所属党组织,性质,"; String title = ""; Row firstRow = hssfSheet.getRow(0); for (int j = 0; j
上一篇:HTML5的两个新增API
下一篇:数组中重复的数字