Skip to content

Commit 4f6df55

Browse files
authored
release: update fastexcel version to 1.2.0 (#311)
1 parent d696a25 commit 4f6df55

File tree

528 files changed

+8080
-8701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

528 files changed

+8080
-8701
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
4. 更新并增加相关API文档和说明。
2323

2424
具体更新内容如下:
25-
- 【新增】新功能-支持支持自定义表头解析 [#257](https://github.com/fast-excel/fastexcel/pull/257) [@721806280](https://github.com/721806280)
25+
- 【新增】新功能-支持自定义表头解析 [#257](https://github.com/fast-excel/fastexcel/pull/257) [@721806280](https://github.com/721806280)
2626
- 【新增】增加测试用例 [#264](https://github.com/fast-excel/fastexcel/pull/264) [@happyfeetw](https://github.com/happyfeetw)
2727
- 【改进】将开源协议修改为 Apache-2.0 license [#251](https://github.com/fast-excel/fastexcel/pull/251) [@psxjoy](https://github.com/psxjoy)
2828
- 【修复】修复最后空列无法读取的BUG [#287](https://github.com/fast-excel/fastexcel/pull/287) [@delei](https://github.com/delei)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ FastExcel 将始终坚持免费开源,并采用商业友好的 Apache 协议
4545
<dependency>
4646
<groupId>cn.idev.excel</groupId>
4747
<artifactId>fastexcel</artifactId>
48-
<version>1.1.0</version>
48+
<version>1.2.0</version>
4949
</dependency>
5050
```
5151
### Gradle
5252
如果您使用 Gradle 进行项目构建,请在 `build.gradle` 文件中引入以下配置:
5353
```gradle
5454
dependencies {
55-
implementation 'cn.idev.excel:fastexcel:1.1.0'
55+
implementation 'cn.idev.excel:fastexcel:1.2.0'
5656
}
5757
```
5858
## EasyExcel 与 FastExcel 的区别
@@ -77,7 +77,7 @@ dependencies {
7777
<dependency>
7878
<groupId>cn.idev.excel</groupId>
7979
<artifactId>fastexcel</artifactId>
80-
<version>1.1.0</version>
80+
<version>1.2.0</version>
8181
</dependency>
8282
```
8383

README_EN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ If you are using Maven for project building, add the following configuration in
3737
<dependency>
3838
<groupId>cn.idev.excel</groupId>
3939
<artifactId>fastexcel</artifactId>
40-
<version>1.1.0</version>
40+
<version>1.2.0</version>
4141
</dependency>
4242
```
4343
### Gradle
4444
If you are using Gradle for project building, add the following configuration in the build.gradle file:
4545

4646
```gradle
4747
dependencies {
48-
implementation 'cn.idev.excel:fastexcel:1.1.0'
48+
implementation 'cn.idev.excel:fastexcel:1.2.0'
4949
}
5050
```
5151
## Update
@@ -73,7 +73,7 @@ Replace with:
7373
<dependency>
7474
<groupId>cn.idev.excel</groupId>
7575
<artifactId>fastexcel</artifactId>
76-
<version>1.1.0</version>
76+
<version>1.2.0</version>
7777
</dependency>
7878
```
7979
### 2. Update Code

README_JP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ Mavenでプロジェクトを構築する場合、`pom.xml`ファイルに次の
3737
<dependency>
3838
<groupId>cn.idev.excel</groupId>
3939
<artifactId>fastexcel</artifactId>
40-
<version>1.1.0</version>
40+
<version>1.2.0</version>
4141
</dependency>
4242
```
4343
### Gradle
4444

4545
Gradleでプロジェクトを構築する場合、build.gradleファイルに次の構成を含めてください:
4646
```gradle
4747
dependencies {
48-
implementation 'cn.idev.excel:fastexcel:1.1.0'
48+
implementation 'cn.idev.excel:fastexcel:1.2.0'
4949
}
5050
```
5151
## 更新する
@@ -70,7 +70,7 @@ EasyExcelの依存関係をFastExcelの依存関係に置き換えます。以
7070
<dependency>
7171
<groupId>cn.idev.excel</groupId>
7272
<artifactId>fastexcel</artifactId>
73-
<version>1.1.0</version>
73+
<version>1.2.0</version>
7474
</dependency>
7575
```
7676
### 2. コードの修正

fastexcel-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>cn.idev.excel</groupId>
88
<artifactId>fastexcel-parent</artifactId>
9-
<version>1.1.0</version>
9+
<version>1.2.0</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

fastexcel-core/src/main/java/cn/idev/excel/EasyExcel.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
*
66
* @author jipengfei
77
*/
8-
public class EasyExcel extends FastExcelFactory {
9-
10-
}
8+
public class EasyExcel extends FastExcelFactory {}

fastexcel-core/src/main/java/cn/idev/excel/ExcelReader.java

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
package cn.idev.excel;
22

3+
import java.io.Closeable;
4+
import java.util.Arrays;
5+
import java.util.List;
6+
7+
import cn.idev.excel.read.metadata.ReadSheet;
8+
import cn.idev.excel.read.metadata.ReadWorkbook;
39
import cn.idev.excel.analysis.ExcelAnalyser;
410
import cn.idev.excel.analysis.ExcelAnalyserImpl;
511
import cn.idev.excel.analysis.ExcelReadExecutor;
612
import cn.idev.excel.context.AnalysisContext;
7-
import cn.idev.excel.read.metadata.ReadSheet;
8-
import cn.idev.excel.read.metadata.ReadWorkbook;
9-
import lombok.extern.slf4j.Slf4j;
1013

11-
import java.io.Closeable;
12-
import java.util.Arrays;
13-
import java.util.List;
14+
import lombok.extern.slf4j.Slf4j;
1415

1516
/**
1617
* Excel readers are all read in event mode.
@@ -19,16 +20,16 @@
1920
*/
2021
@Slf4j
2122
public class ExcelReader implements Closeable {
22-
23+
2324
/**
2425
* Analyser
2526
*/
2627
private final ExcelAnalyser excelAnalyser;
27-
28+
2829
public ExcelReader(ReadWorkbook readWorkbook) {
2930
excelAnalyser = new ExcelAnalyserImpl(readWorkbook);
3031
}
31-
32+
3233
/**
3334
* Parse all sheet content by default
3435
*
@@ -38,14 +39,14 @@ public ExcelReader(ReadWorkbook readWorkbook) {
3839
public void read() {
3940
readAll();
4041
}
41-
42+
4243
/***
4344
* Parse all sheet content by default
4445
*/
4546
public void readAll() {
4647
excelAnalyser.analysis(null, Boolean.TRUE);
4748
}
48-
49+
4950
/**
5051
* Parse the specified sheet,SheetNo start from 0
5152
*
@@ -54,7 +55,7 @@ public void readAll() {
5455
public ExcelReader read(ReadSheet... readSheet) {
5556
return read(Arrays.asList(readSheet));
5657
}
57-
58+
5859
/**
5960
* Read multiple sheets.
6061
*
@@ -65,7 +66,7 @@ public ExcelReader read(List<ReadSheet> readSheetList) {
6566
excelAnalyser.analysis(readSheetList, Boolean.FALSE);
6667
return this;
6768
}
68-
69+
6970
/**
7071
* Context for the entire execution process
7172
*
@@ -74,7 +75,7 @@ public ExcelReader read(List<ReadSheet> readSheetList) {
7475
public AnalysisContext analysisContext() {
7576
return excelAnalyser.analysisContext();
7677
}
77-
78+
7879
/**
7980
* Current executor
8081
*
@@ -83,7 +84,7 @@ public AnalysisContext analysisContext() {
8384
public ExcelReadExecutor excelExecutor() {
8485
return excelAnalyser.excelExecutor();
8586
}
86-
87+
8788
/**
8889
* @return
8990
* @deprecated please use {@link #analysisContext()}
@@ -92,7 +93,7 @@ public ExcelReadExecutor excelExecutor() {
9293
public AnalysisContext getAnalysisContext() {
9394
return analysisContext();
9495
}
95-
96+
9697
/**
9798
* Complete the entire read file.Release the cache and close stream.
9899
*/
@@ -101,14 +102,15 @@ public void finish() {
101102
excelAnalyser.finish();
102103
}
103104
}
104-
105+
105106
@Override
106107
public void close() {
107108
finish();
108109
}
109-
110+
110111
/**
111112
* Prevents calls to {@link #finish} from freeing the cache
113+
*
112114
*/
113115
@Override
114116
protected void finalize() {

fastexcel-core/src/main/java/cn/idev/excel/ExcelWriter.java

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
package cn.idev.excel;
22

3+
import java.io.Closeable;
4+
import java.util.Collection;
5+
import java.util.function.Supplier;
6+
37
import cn.idev.excel.context.WriteContext;
48
import cn.idev.excel.write.ExcelBuilder;
59
import cn.idev.excel.write.ExcelBuilderImpl;
610
import cn.idev.excel.write.metadata.WriteSheet;
711
import cn.idev.excel.write.metadata.WriteTable;
812
import cn.idev.excel.write.metadata.WriteWorkbook;
913
import cn.idev.excel.write.metadata.fill.FillConfig;
10-
import lombok.extern.slf4j.Slf4j;
1114

12-
import java.io.Closeable;
13-
import java.util.Collection;
14-
import java.util.function.Supplier;
15+
import lombok.extern.slf4j.Slf4j;
1516

1617
/**
1718
* Excel Writer This tool is used to write value out to Excel via POI. This object can perform the following two
@@ -26,9 +27,9 @@
2627
*/
2728
@Slf4j
2829
public class ExcelWriter implements Closeable {
29-
30+
3031
private final ExcelBuilder excelBuilder;
31-
32+
3233
/**
3334
* Create new writer
3435
*
@@ -37,7 +38,7 @@ public class ExcelWriter implements Closeable {
3738
public ExcelWriter(WriteWorkbook writeWorkbook) {
3839
excelBuilder = new ExcelBuilderImpl(writeWorkbook);
3940
}
40-
41+
4142
/**
4243
* Write data to a sheet
4344
*
@@ -48,7 +49,7 @@ public ExcelWriter(WriteWorkbook writeWorkbook) {
4849
public ExcelWriter write(Collection<?> data, WriteSheet writeSheet) {
4950
return write(data, writeSheet, null);
5051
}
51-
52+
5253
/**
5354
* Write data to a sheet
5455
*
@@ -59,7 +60,7 @@ public ExcelWriter write(Collection<?> data, WriteSheet writeSheet) {
5960
public ExcelWriter write(Supplier<Collection<?>> supplier, WriteSheet writeSheet) {
6061
return write(supplier.get(), writeSheet, null);
6162
}
62-
63+
6364
/**
6465
* Write value to a sheet
6566
*
@@ -72,7 +73,7 @@ public ExcelWriter write(Collection<?> data, WriteSheet writeSheet, WriteTable w
7273
excelBuilder.addContent(data, writeSheet, writeTable);
7374
return this;
7475
}
75-
76+
7677
/**
7778
* Write value to a sheet
7879
*
@@ -85,7 +86,7 @@ public ExcelWriter write(Supplier<Collection<?>> supplier, WriteSheet writeSheet
8586
excelBuilder.addContent(supplier.get(), writeSheet, writeTable);
8687
return this;
8788
}
88-
89+
8990
/**
9091
* Fill value to a sheet
9192
*
@@ -96,7 +97,7 @@ public ExcelWriter write(Supplier<Collection<?>> supplier, WriteSheet writeSheet
9697
public ExcelWriter fill(Object data, WriteSheet writeSheet) {
9798
return fill(data, null, writeSheet);
9899
}
99-
100+
100101
/**
101102
* Fill value to a sheet
102103
*
@@ -109,7 +110,7 @@ public ExcelWriter fill(Object data, FillConfig fillConfig, WriteSheet writeShee
109110
excelBuilder.fill(data, fillConfig, writeSheet);
110111
return this;
111112
}
112-
113+
113114
/**
114115
* Fill value to a sheet
115116
*
@@ -120,7 +121,7 @@ public ExcelWriter fill(Object data, FillConfig fillConfig, WriteSheet writeShee
120121
public ExcelWriter fill(Supplier<Object> supplier, WriteSheet writeSheet) {
121122
return fill(supplier.get(), null, writeSheet);
122123
}
123-
124+
124125
/**
125126
* Fill value to a sheet
126127
*
@@ -133,7 +134,7 @@ public ExcelWriter fill(Supplier<Object> supplier, FillConfig fillConfig, WriteS
133134
excelBuilder.fill(supplier.get(), fillConfig, writeSheet);
134135
return this;
135136
}
136-
137+
137138
/**
138139
* Close IO
139140
*/
@@ -142,7 +143,7 @@ public void finish() {
142143
excelBuilder.finish(false);
143144
}
144145
}
145-
146+
146147
/**
147148
* The context of the entire writing process
148149
*
@@ -151,12 +152,12 @@ public void finish() {
151152
public WriteContext writeContext() {
152153
return excelBuilder.writeContext();
153154
}
154-
155+
155156
@Override
156157
public void close() {
157158
finish();
158159
}
159-
160+
160161
/**
161162
* Prevents calls to {@link #finish} from freeing the cache
162163
*/

0 commit comments

Comments
 (0)