Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_879456671
easyexcel
提交
329cc3d1
E
easyexcel
项目概览
qq_879456671
/
easyexcel
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,体验更适合开发者的 AI 搜索 >>
提交
329cc3d1
编写于
9月 17, 2021
作者:
庄家钜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改javadoc规范
上级
ccb5026e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
21 addition
and
18 deletion
+21
-18
README.md
README.md
+2
-2
src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java
...m/alibaba/excel/read/metadata/holder/ReadSheetHolder.java
+2
-2
src/main/java/com/alibaba/excel/util/BeanMapUtils.java
src/main/java/com/alibaba/excel/util/BeanMapUtils.java
+1
-1
src/main/java/com/alibaba/excel/util/FieldUtils.java
src/main/java/com/alibaba/excel/util/FieldUtils.java
+9
-9
src/main/java/com/alibaba/excel/util/MapUtils.java
src/main/java/com/alibaba/excel/util/MapUtils.java
+3
-3
src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java
src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java
+1
-1
src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java
...t/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java
+1
-0
src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java
...t/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java
+1
-0
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java
...java/com/alibaba/easyexcel/test/demo/write/WriteTest.java
+1
-0
未找到文件。
README.md
浏览文件 @
329cc3d1
...
...
@@ -29,9 +29,9 @@ Java解析、生成Excel比较有名的框架有Apache poi、jxl。但他们都
*
3+ 版本至少 Java8
### 关于版本升级
*
不建议夸大版本升级 尤其夸2个大版本
*
2+ 升级到3+
*
2+ 升级到
3+
*
使用了自定义拦截器去修改样式的会出问题
*
升级后建议相关内容重新测试下
*
大版本
升级后建议相关内容重新测试下
## 人员招募
由于工作较忙,有意愿做开源的同学可以报名,主要负责群里回答&issue处理,当然也可以做一些PR.
...
...
src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java
浏览文件 @
329cc3d1
...
...
@@ -74,10 +74,10 @@ public class ReadSheetHolder extends AbstractReadHolder {
}
/**
* Approximate total number of rows
* Approximate total number of rows.
* use: getApproximateTotalRowNumber()
*
* @return
* @see #getApproximateTotalRowNumber()
*/
@Deprecated
public
Integer
getTotal
()
{
...
...
src/main/java/com/alibaba/excel/util/BeanMapUtils.java
浏览文件 @
329cc3d1
...
...
@@ -17,7 +17,7 @@ public class BeanMapUtils {
* <code>BeanMap.Generator</code> instead of this static method.
*
* Custom naming policy to prevent null pointer exceptions.
*
<url>https://github.com/alibaba/easyexcel/issues/2064</url>
*
see: https://github.com/alibaba/easyexcel/issues/2064
*
* @param bean the JavaBean underlying the map
* @return a new <code>BeanMap</code> instance
...
...
src/main/java/com/alibaba/excel/util/FieldUtils.java
浏览文件 @
329cc3d1
...
...
@@ -41,15 +41,15 @@ public class FieldUtils {
/**
* Parsing the name matching cglib。
* <
ul
>
*
<ul>null -> null</ul>
*
<ul>string1 -> string1</ul>
*
<ul>String2 -> string2</ul>
*
<ul>sTring3 -> STring3</ul>
*
<ul>STring4 -> STring4</ul>
*
<ul>STRING5 -> STRING5</ul>
*
<ul>STRing6 -> STRing6</ul>
* </
ul
>
* <
pre
>
*
null -> null
*
string1 -> string1
*
String2 -> string2
*
sTring3 -> STring3
*
STring4 -> STring4
*
STRING5 -> STRING5
*
STRing6 -> STRing6
* </
pre
>
*
* @param field field
* @return field name.
...
...
src/main/java/com/alibaba/excel/util/MapUtils.java
浏览文件 @
329cc3d1
...
...
@@ -17,9 +17,9 @@ public class MapUtils {
/**
* Creates a <i>mutable</i>, empty {@code HashMap} instance.
*
* <p><b>Note:</b> if mutability is not required, use
{@link ImmutableMap#of()}
instead.
* <p><b>Note:</b> if mutability is not required, use
ImmutableMap.of()
instead.
*
* <p><b>Note:</b> if {@code K} is an {@code enum} type, use
{@link #newEnumMap}
instead.
* <p><b>Note:</b> if {@code K} is an {@code enum} type, use
newEnumMap
instead.
*
* <p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as
* deprecated. Instead, use the {@code HashMap} constructor directly, taking advantage of the new
...
...
@@ -35,7 +35,7 @@ public class MapUtils {
* Creates a <i>mutable</i>, empty {@code TreeMap} instance using the natural ordering of its
* elements.
*
* <p><b>Note:</b> if mutability is not required, use
{@link ImmutableSortedMap#of()}
instead.
* <p><b>Note:</b> if mutability is not required, use
ImmutableSortedMap.of()
instead.
*
* <p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as
* deprecated. Instead, use the {@code TreeMap} constructor directly, taking advantage of the new
...
...
src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java
浏览文件 @
329cc3d1
...
...
@@ -20,7 +20,7 @@ public class PoiUtils {
/**
* Whether to customize the height
*
* @param row
* @param row
row
* @return
*/
public
static
boolean
customHeight
(
Row
row
)
{
...
...
src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java
浏览文件 @
329cc3d1
...
...
@@ -72,6 +72,7 @@ public class FillTest {
EasyExcel
.
write
(
fileName
).
withTemplate
(
templateFileName
).
sheet
().
doFill
(
data
());
// 方案2 分多次 填充 会使用文件缓存(省内存) jdk8
// since: 3.0.0-beta1
fileName
=
TestFileUtil
.
getPath
()
+
"listFill"
+
System
.
currentTimeMillis
()
+
".xlsx"
;
EasyExcel
.
write
(
fileName
)
.
withTemplate
(
templateFileName
)
...
...
src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java
浏览文件 @
329cc3d1
...
...
@@ -46,6 +46,7 @@ public class ReadTest {
@Test
public
void
simpleRead
()
{
// 写法1:JDK8+ ,不用额外写一个ReadListener
// since: 3.0.0-beta1
String
fileName
=
TestFileUtil
.
getPath
()
+
"demo"
+
File
.
separator
+
"demo.xlsx"
;
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
// 这里每次会读取3000条数据 然后返回过来 直接调用使用数据就行
...
...
src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java
浏览文件 @
329cc3d1
...
...
@@ -60,6 +60,7 @@ public class WriteTest {
@Test
public
void
simpleWrite
()
{
// 写法1 JDK8+
// since: 3.0.0-beta1
String
fileName
=
TestFileUtil
.
getPath
()
+
"simpleWrite"
+
System
.
currentTimeMillis
()
+
".xlsx"
;
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
// 如果这里想使用03 则 传入excelType参数即可
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录