Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
金手指1668
easyexcel
提交
7b9890ae
E
easyexcel
项目概览
金手指1668
/
easyexcel
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
7b9890ae
编写于
11月 05, 2019
作者:
庄家钜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增since
上级
d7af9b42
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
3 deletion
+22
-3
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
+5
-2
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java
...java/com/alibaba/easyexcel/test/demo/write/WriteTest.java
+2
-0
src/test/java/com/alibaba/easyexcel/test/temp/read/HeadReadTest.java
...va/com/alibaba/easyexcel/test/temp/read/HeadReadTest.java
+12
-0
update.md
update.md
+3
-1
未找到文件。
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
浏览文件 @
7b9890ae
...
@@ -25,10 +25,13 @@ public class ExcelBuilderImpl implements ExcelBuilder {
...
@@ -25,10 +25,13 @@ public class ExcelBuilderImpl implements ExcelBuilder {
private
ExcelWriteFillExecutor
excelWriteFillExecutor
;
private
ExcelWriteFillExecutor
excelWriteFillExecutor
;
private
ExcelWriteAddExecutor
excelWriteAddExecutor
;
private
ExcelWriteAddExecutor
excelWriteAddExecutor
;
static
{
// Create temporary cache directory at initialization time to avoid POI concurrent write bugs
FileUtils
.
createPoiFilesDirectory
();
}
public
ExcelBuilderImpl
(
WriteWorkbook
writeWorkbook
)
{
public
ExcelBuilderImpl
(
WriteWorkbook
writeWorkbook
)
{
try
{
try
{
// Create temporary cache directory at initialization time to avoid POI concurrent write bugs
FileUtils
.
createPoiFilesDirectory
();
context
=
new
WriteContextImpl
(
writeWorkbook
);
context
=
new
WriteContextImpl
(
writeWorkbook
);
}
catch
(
RuntimeException
e
)
{
}
catch
(
RuntimeException
e
)
{
finishOnException
();
finishOnException
();
...
...
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java
浏览文件 @
7b9890ae
...
@@ -73,6 +73,8 @@ public class WriteTest {
...
@@ -73,6 +73,8 @@ public class WriteTest {
* 2. 根据自己或者排除自己需要的列
* 2. 根据自己或者排除自己需要的列
* <p>
* <p>
* 3. 直接写即可
* 3. 直接写即可
*
* @since 2.1.1
*/
*/
@Test
@Test
public
void
excludeOrIncludeWrite
()
{
public
void
excludeOrIncludeWrite
()
{
...
...
src/test/java/com/alibaba/easyexcel/test/temp/read/HeadReadTest.java
浏览文件 @
7b9890ae
...
@@ -8,6 +8,7 @@ import org.slf4j.Logger;
...
@@ -8,6 +8,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.cache.Ehcache
;
/**
/**
* 临时测试
* 临时测试
...
@@ -25,4 +26,15 @@ public class HeadReadTest {
...
@@ -25,4 +26,15 @@ public class HeadReadTest {
}
}
@Test
public
void
testCache
()
throws
Exception
{
File
file
=
new
File
(
"D:\\test\\headt1.xls"
);
EasyExcel
.
read
(
file
,
HeadReadData
.
class
,
new
HDListener
()).
readCache
(
new
Ehcache
(
20
)).
sheet
(
0
).
doRead
();
LOGGER
.
info
(
"------------------"
);
EasyExcel
.
read
(
file
,
HeadReadData
.
class
,
new
HDListener
()).
readCache
(
new
Ehcache
(
20
)).
sheet
(
0
).
doRead
();
LOGGER
.
info
(
"------------------"
);
EasyExcel
.
read
(
file
,
HeadReadData
.
class
,
new
HDListener
()).
readCache
(
new
Ehcache
(
20
)).
sheet
(
0
).
doRead
();
}
}
}
update.md
浏览文件 @
7b9890ae
# 2.1.2
# 2.1.1
# 2.1.1
*
发布正式版
*
发布正式版
*
修改map返回为LinkedHashMap
*
修改map返回为LinkedHashMap
...
@@ -61,7 +63,7 @@
...
@@ -61,7 +63,7 @@
*
修复监听器转换异常会重复提示的bug
*
修复监听器转换异常会重复提示的bug
# 2.0.1
# 2.0.1
*
降级poi为3.1
.
7 兼容jdk6
*
降级poi为3.17 兼容jdk6
# 2.0.0
# 2.0.0
*
修复当cell为空可能会抛出空指针的bug
*
修复当cell为空可能会抛出空指针的bug
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录