Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
苏木力格
easyexcel
提交
c60be8dd
E
easyexcel
项目概览
苏木力格
/
easyexcel
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
easyexcel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c60be8dd
编写于
4月 22, 2020
作者:
庄家钜
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/bugfix' into developing
# Conflicts: # pom.xml # update.md
上级
148eed9d
ff851219
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
0 deletion
+42
-0
src/main/java/com/alibaba/excel/ExcelReader.java
src/main/java/com/alibaba/excel/ExcelReader.java
+2
-0
src/test/java/com/alibaba/easyexcel/test/temp/read/HeadReadTest.java
...va/com/alibaba/easyexcel/test/temp/read/HeadReadTest.java
+10
-0
src/test/java/com/alibaba/easyexcel/test/temp/read/TestListener.java
...va/com/alibaba/easyexcel/test/temp/read/TestListener.java
+27
-0
update.md
update.md
+3
-0
未找到文件。
src/main/java/com/alibaba/excel/ExcelReader.java
浏览文件 @
c60be8dd
...
...
@@ -136,6 +136,8 @@ public class ExcelReader {
readWorkbook
.
setReadCache
(
new
MapCache
());
readWorkbook
.
setConvertAllFiled
(
Boolean
.
FALSE
);
readWorkbook
.
setDefaultReturnMap
(
Boolean
.
FALSE
);
// The previous logic was that Article 0 started reading
readWorkbook
.
setHeadRowNumber
(
0
);
excelAnalyser
=
new
ExcelAnalyserImpl
(
readWorkbook
);
}
...
...
src/test/java/com/alibaba/easyexcel/test/temp/read/HeadReadTest.java
浏览文件 @
c60be8dd
package
com.alibaba.easyexcel.test.temp.read
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
org.junit.Ignore
;
import
org.junit.Test
;
...
...
@@ -9,7 +10,9 @@ import org.slf4j.LoggerFactory;
import
com.alibaba.easyexcel.test.util.TestFileUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.cache.Ehcache
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
/**
* 临时测试
...
...
@@ -19,6 +22,13 @@ import com.alibaba.excel.cache.Ehcache;
@Ignore
public
class
HeadReadTest
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
HeadReadTest
.
class
);
@Test
public
void
testread
()
throws
Exception
{
FileInputStream
fileInputStream
=
new
FileInputStream
(
"D://test/t1.xlsx"
);
ExcelReader
excelReader
=
new
ExcelReader
(
fileInputStream
,
ExcelTypeEnum
.
XLSX
,
null
,
new
TestListener
());
excelReader
.
read
();
}
@Test
public
void
test
()
throws
Exception
{
...
...
src/test/java/com/alibaba/easyexcel/test/temp/read/TestListener.java
0 → 100644
浏览文件 @
c60be8dd
package
com.alibaba.easyexcel.test.temp.read
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
/**
* TODO
*
* @author JiaJu Zhuang
* @date 2020/4/9 16:33
**/
@Slf4j
public
class
TestListener
extends
AnalysisEventListener
{
@Override
public
void
invoke
(
Object
o
,
AnalysisContext
analysisContext
)
{
log
.
info
(
"解析一条:{}"
,
JSON
.
toJSONString
(
o
));
}
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
analysisContext
)
{
}
}
update.md
浏览文件 @
c60be8dd
...
...
@@ -20,6 +20,9 @@
*
修复读取转换器的并发问题
*
填充支持多个List对象
# 2.1.7
*
修复使用1+版本的写法,第1条开始读修改为第0条开始读
# 2.1.6
*
修复写入只有
`sheetName`
会抛异常
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录