您的位置:首页 > 其它

Excel hander

2016-07-22 12:28 190 查看
For excel handle . we have two way to fix .

one is use poi to handle the excel data .

another way is use jXLS to handle the excel.

http://fahdshariff.blogspot.hk/2014/06/parsing-excel-file-into-javabeans-using.html

/**

* Parses an excel file into a list of beans.

*

* @param the type of the bean

* @param xlsFile the excel data file to parse

* @param jxlsConfigFile the jxls config file describing how to map rows to beans

* @return the list of beans or an empty list there are none

* @throws Exception if there is a problem parsing the file

*/

public static List parseExcelFileToBeans(final File xlsFile,

final File jxlsConfigFile)

throws Exception {

final XLSReader xlsReader = ReaderBuilder.buildFromXML(jxlsConfigFile);

final List result = new ArrayList<>();

final Map
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  excel