除了用poi读取Excel的表格外,还可用ExcelHelper读取Excel。代码一例
String[] fieldNames = new String[] { "studentId", "testId", "testCn", "school", "classNum", "name", "questionId", "answer" }; File file1 = new File(Path); ExcelHelper eh1 = JxlExcelHelper.getInstance(file1); Log4jUtil.info("-----更新小题EXCEL 开始------"); List<AnswerBo> list1 = eh1.readExcelRowToCol(AnswerBo.class, fieldNames, true, fieldNames.length - 2); Log4jUtil.info("-----更新小题EXCEL 结束------"); List<AnswerBo> newlist = new ArrayList<AnswerBo>();
工作小结,记于2018年7月3日