我是靠谱客的博主 激动短靴,最近开发中收集的这篇文章主要介绍JAVA分批读取excle_Java读取Excel文件(支持xls,xlsx,多sheet),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1. pom.xml依赖

org.apache.poi

poi

4.0.1

org.apache.poi

poi-ooxml

4.0.1

org.apache.poi

poi-ooxml-schemas

4.0.1

2. 工具类封装

public class ExcelReadUtil {

private static Logger logger = LoggerFactory.getLogger(ExcelReadUtil.class);

public static HashMap>> readExcel(File file, int ignoreRow) {

if (file.getName().toLowerCase().endsWith(".xlsx")) {

return readExcelForXlsx(file, ignoreRow);

} else if (file.getName().toLowerCase().endsWith(".xls")) {

return readExcelForXls(file, ignoreRow);

}

return null;

}

/**

* 读取Excel xlsx后缀名文件数据

*

* @param file

*/

private static HashMap>> readExcelForXlsx(File file, int ignoreRow) {

HashMap>> map = new Ha

最后

以上就是激动短靴为你收集整理的JAVA分批读取excle_Java读取Excel文件(支持xls,xlsx,多sheet)的全部内容,希望文章能够帮你解决JAVA分批读取excle_Java读取Excel文件(支持xls,xlsx,多sheet)所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部