1 packagecn.tele.demo;2
3 importjava.io.File;4 importjava.io.FileInputStream;5 importjava.io.FileNotFoundException;6 importjava.io.FileOutputStream;7 importjava.io.IOException;8 importjava.io.InputStream;9 importjava.io.OutputStream;10 importjava.sql.SQLException;11 importjava.util.List;12
13 importorg.apache.commons.dbutils.QueryRunner;14 importorg.apache.commons.dbutils.handlers.BeanHandler;15 importorg.apache.commons.dbutils.handlers.BeanListHandler;16 importorg.junit.Test;17
18 importcom.alibaba.excel.ExcelReader;19 importcom.alibaba.excel.ExcelWriter;20 importcom.alibaba.excel.metadata.Sheet;21 importcom.alibaba.excel.support.ExcelTypeEnum;22
23 /**
24 * 读取Excel25 *26 *@authorTele27 *28 */
29
30 public classDemo {31
32 /**
33 * 读取excel并插入mysql中 sheet第一个参数为sheetNo代表sheet的编号,第二个参数表示从第几行开始读,最小是1, new34 * Sheet(1,0,Student.class)发现无输出结果35 *36 *@throwsFileNotFound