public class ExcelReader{private static BeanUtilsBean beanUtilsBean = newBeanUtilsBean();static{
beanUtilsBean.getConvertUtils().register(new org.apache.commons.beanutils.converters.DateConverter(null), java.util.Date.class);
}/*** 表头名字和对应所在第几列的下标,用于根据title取到对应的值*/
private final Map title_to_index = new HashMap<>();/*** 所有带有ExcelIn注解的字段*/
private final List fields = new ArrayList<>();/*** 统计表格的行和列数量用来遍历表格*/
private int firstCellNum = 0;private int lastCellNum = 0;private int firstRowNum = 0;private int lastRowNum = 0;privateString sheetName ;privateHSSFSheet sheet ;public List read(InputStream in , Class clazz) throwsException {
gatherAnnotationFields(clazz);
configSheet(in);
configHeader();
List rList= null;try{
rList=readContent(clazz);
}catch(IllegalAccessException e) {thro