easyexcel plus init
This commit is contained in:
parent
e7673f3e5b
commit
7062b4576f
@ -1,9 +0,0 @@
|
||||
# 建议先去看文档
|
||||
[快速开始](https://easyexcel.opensource.alibaba.com/docs/current/) 、[常见问题](https://easyexcel.opensource.alibaba.com/qa/)
|
||||
# 异常代码
|
||||
```java
|
||||
这里写你的代码
|
||||
```
|
||||
# 异常提示
|
||||
大家尽量把问题一次性描述清楚,然后贴上全部异常,这样方便把问题一次性解决掉。
|
||||
# 其他描述
|
20
.github/ISSUE_TEMPLATE/bug.md
vendored
20
.github/ISSUE_TEMPLATE/bug.md
vendored
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: bug
|
||||
about: 发现一个新的Bug
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: zhuangjiaju
|
||||
|
||||
---
|
||||
|
||||
# 建议先去看文档
|
||||
[快速开始](https://easyexcel.opensource.alibaba.com/docs/current/) 、[常见问题](https://easyexcel.opensource.alibaba.com/qa/)
|
||||
# 触发场景描述
|
||||
|
||||
# 触发Bug的代码
|
||||
```java
|
||||
这里写代码
|
||||
```
|
||||
# 提示的异常或者没有达到的效果
|
||||
大家尽量把问题一次性描述清楚,然后贴上全部异常,这样方便把问题一次性解决掉。
|
||||
至少大家要符合一个原则就是,能让其他人复现出这个问题,如果无法复现,肯定无法解决。
|
19
.github/ISSUE_TEMPLATE/question.md
vendored
19
.github/ISSUE_TEMPLATE/question.md
vendored
@ -1,19 +0,0 @@
|
||||
---
|
||||
name: question
|
||||
about: 有使用疑问,请先阅读“快速开始”,上面无法解决再提交问题。处理完请关闭问题。
|
||||
title: ''
|
||||
labels: help wanted
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# 建议先去看文档
|
||||
[快速开始](https://easyexcel.opensource.alibaba.com/docs/current/) 、[常见问题](https://easyexcel.opensource.alibaba.com/qa/)
|
||||
# 异常代码
|
||||
```java
|
||||
这里写你的代码
|
||||
```
|
||||
# 异常提示
|
||||
大家尽量把问题一次性描述清楚,然后贴上全部异常,这样方便把问题一次性解决掉。
|
||||
至少大家要符合一个原则就是,能让其他人复现出这个问题,如果无法复现,肯定无法解决。
|
||||
# 问题描述
|
12
.github/ISSUE_TEMPLATE/suggest.md
vendored
12
.github/ISSUE_TEMPLATE/suggest.md
vendored
@ -1,12 +0,0 @@
|
||||
---
|
||||
name: suggest
|
||||
about: 给出一些建议的能
|
||||
title: ''
|
||||
labels: suggest
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# 建议先去看文档
|
||||
[快速开始](https://easyexcel.opensource.alibaba.com/docs/current/) 、[常见问题](https://easyexcel.opensource.alibaba.com/qa/)
|
||||
# 建议描述
|
@ -1,10 +0,0 @@
|
||||
## 关联的ISSUE
|
||||
TODO 请说明关联的异常
|
||||
## 问题描述&解决
|
||||
TODO 描述下出了什么问题,必要的话提供excel。在PR合并前,审核同学一定会复现问题,然后再PR合并的。
|
||||
## 代码注意点
|
||||
* 确认已经安装了阿里巴巴代码规约插件:[alibaba-java-coding-guidelines ](https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines)
|
||||
* src/main 下面不要出现中文注释
|
||||
* src/test/core && src/test/demo 下面要新增测试案例请严格参照其他的,包括注释等等什么都不要错
|
||||
* 如果只是自己测试 全部加入到 src/test/temp
|
||||
* 如果改动量较大(5+文件)尽量先和作者沟通,这个风险很大
|
@ -1,9 +0,0 @@
|
||||
## 前言
|
||||
非常感谢您愿意协助EasyExcel的开发,EasyExcel成长离不开大家的贡献。但是为了合作的更有效率,希望我们在贡献代码的时候能按照如下约定。
|
||||
## 提前沟通
|
||||
尽量把自己的想法和实现思路提前沟通,可以通过issue,钉钉,QQ都可以,可能很多问题我们内部已经讨论过,由于各种原因后续不会支持,但是您这边又开发好了,这样容易浪费您的时间。
|
||||
## 代码规范
|
||||
请先安装阿里巴巴代码规约插件!!!https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines
|
||||
目前代码规范已经集成了自动校验,然后源代码尽量不要有中文注释。在新增功能的时候,尽量注意补充junit。core代表每次travis-ci都会跑的测试案例,然后demo用于对外看到,temp里面随便写。
|
||||
## 提交分支
|
||||
建议提交到最新的版本号.x上面,比如 3.x之类的版本,为了方便其他同学阅读源代码,所以目前的思路是master和maven center的最新版本代码保持一致,然后您提交过来的代码我们可能会稍微做一些修改。所以提交到开发分支会比较好。fork也可以直接fork该分支。
|
157
README_EN.md
157
README_EN.md
@ -1,157 +0,0 @@
|
||||
EasyExcel
|
||||
======================
|
||||
[](https://github.com/alibaba/easyexcel/actions/workflows/ci.yml?query=branch%3Amaster)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/com.alibaba/easyexcel)
|
||||
[](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
[](https://opensource.alibaba.com/contribution_leaderboard/details?projectValue=easyexcel)
|
||||
|
||||
[Communication Group 1 in QQ(Full): 662022184](https://jq.qq.com/?_wv=1027&k=1T21jJxh)
|
||||
[Communication Group 2 in QQ(Full): 1097936804](https://jq.qq.com/?_wv=1027&k=j5zEy6Xl)
|
||||
[Communication Group 3 in QQ(Full): 453928496](https://qm.qq.com/cgi-bin/qm/qr?k=e2ULsA5A0GldhV2CXJ8sIbAyu9I6qqs7&jump_from=webapi)
|
||||
[Communication Group 4 in QQ: 496594404](https://qm.qq.com/cgi-bin/qm/qr?k=e_aVG1Q7gi0PJUBkbrUGAgbeO3kUEInK&jump_from=webapi)
|
||||
[Communication Group 1 in DingTalk(Full): 21960511](https://qr.dingtalk.com/action/joingroup?code=v1,k1,cchz6k12ci9B08NNqhNRFGXocNVHrZtW0kaOtTKg/Rk=&_dt_no_comment=1&origin=11)
|
||||
[Communication Group 2 in DingTalk(Full): 32796397](https://qr.dingtalk.com/action/joingroup?code=v1,k1,jyU9GtEuNU5S0QTyklqYcYJ8qDZtUuTPMM7uPZTS8Hs=&_dt_no_comment=1&origin=11)
|
||||
[Communication Group 3 in DingTalk(Full): 33797247](https://qr.dingtalk.com/action/joingroup?code=v1,k1,3UGlEScTGQaHpW2cIRo+gkxJ9EVZ5fz26M6nW3uFP30=&_dt_no_comment=1&origin=11)
|
||||
[Communication Group 4 in DingTalk(Full): 33491624](https://qr.dingtalk.com/action/joingroup?code=v1,k1,V14Pb65Too70rQkEaJ9ohb6lZBZbtp6jIL/q9EWh9vA=&_dt_no_comment=1&origin=11)
|
||||
[Communication Group 5 in DingTalk: 32134498](https://h5.dingtalk.com/circle/healthCheckin.html?dtaction=os&corpId=dingb9fa1325d9dccc3ecac589edd02f1650&5233a=71a83&cbdbhh=qwertyuiop)
|
||||
[Official Website: https://yuque.com/easyexcel](https://www.yuque.com/easyexcel/doc/easyexcel)
|
||||
|
||||
[FAQ](https://www.yuque.com/easyexcel/faq)
|
||||
#### It is recommended to join a DingTalk group
|
||||
|
||||
# EasyExcel, a java toolkit for parsing Excel easily
|
||||
There are several java frameworks or toolkit which can parse and generate Excel, such as Apache POI or jxl. But they all have some difficulties to handle problems like excessive memory usage. Apache POI framework has a set of SAX mode API can fix some memory overflow problems at some extent, but it still has some flaws. For example, the unzipping and the storage of the unzipping of Excel file in version 07 are done in memory, so the memory consumption is still very high. The EasyExcel toolkit rewrites the logic of POI for parsing Excel version 07. One 3 megabytes Excel file parsed with POI still requires about 100M memory, which can be reduced to a few megabyte by using EasyExcel instead. And yes, there is no memory overflow for even larger excel with EasyExcel. EasyExcel version 03 depends on POI SAX model and does model transformation/encapsulation in the upper layer to make it simpler and more convenient for users.
|
||||
|
||||
## Using EasyExcel version 3.0.2+, a machine with 64M RAM can read a 75 megabyte Excel file containing 460,000 rows and 25 columns in 20 seconds
|
||||
Of course, there is also a very fast mode can be faster, but the memory consumption will be a little more than 100M
|
||||

|
||||
|
||||
## Version support
|
||||
* EasyExcel version 2+ works on Java7 or Java6
|
||||
* EasyExcel version 3+ works on Java8 or java8+
|
||||
### About version upgrade
|
||||
* It is not recommended upgrading across major versions, especially across 2 major versions.
|
||||
* There are some incompatibilities in upgrading from version 2+ to version 3+.
|
||||
* Using a custom interceptor to modify the style can cause problems, even if it does not compile with errors.
|
||||
* When reading the Excel file, the `invoke` function will throw an exception, there will not be an additional layer of `ExcelAnalysisException` wrapped here, and it will not compile with errors.
|
||||
* Style and other annotations involving `boolean` or some enumeration values have been changed, adding the default value. The compiler will report an error, just change the annotation.
|
||||
* It is recommended to re-test the relevant functions after upgrading across major versions.
|
||||
|
||||
### Latest Version
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## Advertising space
|
||||
### Alibaba New Retail Business Department Recruitment
|
||||
Alibaba New Retail Business Department sincerely recruit JAVA senior development, technical experts. If you are interested, you can contact us by WeChat, or send your Resume to my email jipengfei.jpf@alibaba-inc.com.
|
||||
### EasyExcel personnel recruitment
|
||||
Anyone who wants to participate in this project can apply, mainly responsible for answering questions in the communication group and dealing with the issues. Of course, you can also do some PR.
|
||||
Since there is no material reward for participating in the open source project, and the current maintainers are also maintaining the project in their spare time. So people who want to join this project need to be persistent, not just on a whim.
|
||||
The requirements are as follows:
|
||||
* There are certain java coding skills & good coding habits
|
||||
* Understand the read&write principles of EasyExcel
|
||||
* Has passion for open source projects
|
||||
* Be able to do things consistently for a long time
|
||||
* Your job is not so busy
|
||||
|
||||
## Related Documents
|
||||
* [Quick Start](https://www.yuque.com/easyexcel/doc/easyexcel)
|
||||
* [About Us](/abouteasyexcel.md)
|
||||
* [Update Notes](/update.md)
|
||||
* [Code Contribution](https://www.yuque.com/easyexcel/doc/contribute)
|
||||
|
||||
## Maintainers
|
||||
姬朋飞(玉霄)、庄家钜、怀宇
|
||||
## Quick Start
|
||||
### Read Excel File
|
||||
DEMO:[https://github.com/alibaba/easyexcel/blob/master/src/test/java/com/alibaba/easyexcel/demo/read/ReadTest.java](/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java)
|
||||
|
||||
```java
|
||||
/**
|
||||
* The easiest way to read Excel file using EasyExcel toolkit
|
||||
*
|
||||
* <p>
|
||||
* 1. Create an entity object, such as {@link DemoData}, each property of the entity object corresponds to a specific field in any row of Excel.
|
||||
* 2. When reading each row of an Excel file, create a callback listener for the corresponding row. Refer to{@link DemoDataListener}
|
||||
* 3. Invoke the read function
|
||||
* </p>
|
||||
*/
|
||||
@Test
|
||||
public void simpleRead() {
|
||||
String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx";
|
||||
// Specify which entity object class to use to read the Excel content. The file stream will close automatically after reading the first sheet of Excel.
|
||||
EasyExcel.read(fileName, DemoData.class, new DemoDataListener()).sheet().doRead();
|
||||
}
|
||||
```
|
||||
|
||||
### Write Excel File
|
||||
DEMO:[https://github.com/alibaba/easyexcel/blob/master/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java](/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java)
|
||||
```java
|
||||
/**
|
||||
* The easiest way to write Excel file using EasyExcel toolkit
|
||||
*
|
||||
* <p>
|
||||
* 1. Create an entity object, refer to{@link write.demo.plus.easyexcel.test.DemoData}.
|
||||
* Each property of the entity object corresponds to a specific field of Excel
|
||||
* 2. Invoke write function
|
||||
* </p>
|
||||
*/
|
||||
@Test
|
||||
public void simpleWrite() {
|
||||
String fileName = TestFileUtil.getPath() + "write" + System.currentTimeMillis() + ".xlsx";
|
||||
// Specify which entity object class to use to write Excel, it will write to the first sheet of Excel with the name template. Then the file stream will be closed automatically.
|
||||
// With version 03, just pass in the excelType parameter
|
||||
EasyExcel.write(fileName, DemoData.class).sheet("template").doWrite(data());
|
||||
}
|
||||
```
|
||||
|
||||
### File Uploading&Downloading
|
||||
DEMO:[https://github.com/alibaba/easyexcel/blob/master/src/test/java/com/alibaba/easyexcel/test/demo/web/WebTest.java](/src/test/java/com/alibaba/easyexcel/test/demo/web/WebTest.java)
|
||||
```java
|
||||
/**
|
||||
* File downloading
|
||||
*
|
||||
* Note: returns an Excel with partial data if it fails
|
||||
*
|
||||
* <p>
|
||||
* 1. Create an entity object, refer to{@link DownloadData}.
|
||||
* Each property of the entity object corresponds to a specific field of Excel
|
||||
* 2. Specify the returned properties
|
||||
* 3. Invoke write function, then the OutputStream is automatically closed when it ends.
|
||||
* </p>
|
||||
*/
|
||||
@GetMapping("download")
|
||||
public void download(HttpServletResponse response) throws IOException {
|
||||
// Using swagger may cause some problems, please use your browser directly or use postman to invoke this
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
// URLEncoder.encode function can prevent Chinese garbled code
|
||||
String fileName = URLEncoder.encode("test", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
EasyExcel.write(response.getOutputStream(), DownloadData.class).sheet("template").doWrite(data());
|
||||
}
|
||||
|
||||
/**
|
||||
* File uploading
|
||||
*
|
||||
* <p>
|
||||
* 1. Create an entity object, refer to{@link UploadData}
|
||||
* Each property of the entity object corresponds to a specific field of Excel
|
||||
* 2. When reading each row of an Excel file, create a callback listener for the corresponding row. Refer to{@link UploadDataListener}
|
||||
* 3. Invoke read function
|
||||
* </p>
|
||||
*/
|
||||
@PostMapping("upload")
|
||||
@ResponseBody
|
||||
public String upload(MultipartFile file) throws IOException {
|
||||
EasyExcel.read(file.getInputStream(), UploadData.class, new UploadDataListener(uploadDAO)).sheet().doRead();
|
||||
return "success";
|
||||
}
|
||||
```
|
||||
### Contact Us
|
||||
If you have any questions, Alibaba colleagues can find me in DingTalk, and others can leave messages here. All related questions are well welcomed.
|
@ -174,7 +174,7 @@ public class ExcelAnalyserImpl implements ExcelAnalyser {
|
||||
}
|
||||
|
||||
// close csv.
|
||||
// https://github.com/alibaba/easyexcel/issues/2309
|
||||
// https://github.com/CodePhiliaX/easyexcel-plus/issues/2309
|
||||
try {
|
||||
if ((readWorkbookHolder instanceof CsvReadWorkbookHolder)
|
||||
&& ((CsvReadWorkbookHolder) readWorkbookHolder).getCsvParser() != null
|
||||
|
@ -34,7 +34,7 @@ public class DummyRecordHandler extends AbstractXlsRecordHandler implements Igno
|
||||
xlsReadSheetHolder.setTempRowType(RowTypeEnum.EMPTY);
|
||||
} else if (record instanceof MissingCellDummyRecord) {
|
||||
MissingCellDummyRecord mcdr = (MissingCellDummyRecord)record;
|
||||
// https://github.com/alibaba/easyexcel/issues/2236
|
||||
// https://github.com/CodePhiliaX/easyexcel-plus/issues/2236
|
||||
// Some abnormal XLS, in the case of data already exist, or there will be a "MissingCellDummyRecord"
|
||||
// records, so if the existing data, empty data is ignored
|
||||
xlsReadSheetHolder.getCellMap().putIfAbsent(mcdr.getColumn(),
|
||||
|
@ -59,7 +59,7 @@ public @interface ExcelProperty {
|
||||
|
||||
/**
|
||||
*
|
||||
* default @see com.alibaba.excel.util.TypeUtil if default is not meet you can set format
|
||||
* default @see ai.chat2db.excel.util.TypeUtil if default is not meet you can set format
|
||||
*
|
||||
* @return Format string
|
||||
* @deprecated please use {@link DateTimeFormat}
|
||||
|
@ -6,7 +6,7 @@ import java.time.LocalDateTime;
|
||||
import ai.chat2db.excel.metadata.data.ReadCellData;
|
||||
|
||||
/**
|
||||
* Read not to {@code com.alibaba.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Read not to {@code ai.chat2db.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
*
|
||||
* @author Jiaju Zhuang
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@ package ai.chat2db.excel.exception;
|
||||
* This exception will only stop the parsing of the current sheet. If you want to stop the entire excel parsing, please
|
||||
* use ExcelAnalysisStopException.
|
||||
*
|
||||
* The com.alibaba.excel.read.listener.ReadListener#doAfterAllAnalysed(com.alibaba.excel.context.AnalysisContext) method
|
||||
* The ai.chat2db.excel.read.listener.ReadListener#doAfterAllAnalysed(ai.chat2db.excel.context.AnalysisContext) method
|
||||
* is called after the call is stopped.
|
||||
*
|
||||
* @author Jiaju Zhuang
|
||||
|
@ -201,7 +201,7 @@ public class ExcelReaderBuilder extends AbstractExcelReaderParameterBuilder<Exce
|
||||
}
|
||||
|
||||
/**
|
||||
* Read not to {@code com.alibaba.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Read not to {@code ai.chat2db.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Is only effective when set `useDefaultListener=true` or `useDefaultListener=null`.
|
||||
*
|
||||
* @see ReadDefaultReturnEnum
|
||||
|
@ -70,7 +70,7 @@ public class ModelBuildEventListener implements IgnoreExceptionReadListener<Map<
|
||||
}
|
||||
}
|
||||
}
|
||||
// fix https://github.com/alibaba/easyexcel/issues/2014
|
||||
// fix https://github.com/CodePhiliaX/easyexcel-plus/issues/2014
|
||||
int headSize = calculateHeadSize(readSheetHolder);
|
||||
while (index < headSize) {
|
||||
map.put(index, null);
|
||||
|
@ -102,7 +102,7 @@ public class ReadWorkbook extends ReadBasicParameter {
|
||||
private Boolean useDefaultListener;
|
||||
|
||||
/**
|
||||
* Read not to {@code com.alibaba.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Read not to {@code ai.chat2db.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Is only effective when set `useDefaultListener=true` or `useDefaultListener=null`.
|
||||
*
|
||||
* @see ReadDefaultReturnEnum
|
||||
|
@ -63,7 +63,7 @@ public class ReadSheetHolder extends AbstractReadHolder {
|
||||
private ReadCellData<?> tempCellData;
|
||||
/**
|
||||
* Read the size of the largest head in sheet head data.
|
||||
* see https://github.com/alibaba/easyexcel/issues/2014
|
||||
* see https://github.com/CodePhiliaX/easyexcel-plus/issues/2014
|
||||
*/
|
||||
private Integer maxNotEmptyDataHeadSize;
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class ReadWorkbookHolder extends AbstractReadHolder {
|
||||
private Boolean autoCloseStream;
|
||||
|
||||
/**
|
||||
* Read not to {@code com.alibaba.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Read not to {@code ai.chat2db.excel.metadata.BasicParameter#clazz} value, the default will return type.
|
||||
* Is only effective when set `useDefaultListener=true` or `useDefaultListener=null`.
|
||||
*
|
||||
* @see ReadDefaultReturnEnum
|
||||
|
@ -17,7 +17,7 @@ public class BeanMapUtils {
|
||||
* <code>BeanMap.Generator</code> instead of this static method.
|
||||
*
|
||||
* Custom naming policy to prevent null pointer exceptions.
|
||||
* see: https://github.com/alibaba/easyexcel/issues/2064
|
||||
* see: https://github.com/CodePhiliaX/easyexcel-plus/issues/2064
|
||||
*
|
||||
* @param bean the JavaBean underlying the map
|
||||
* @return a new <code>BeanMap</code> instance
|
||||
|
@ -102,7 +102,7 @@ public class ExcelWriteAddExecutor extends AbstractExcelWriteExecutor {
|
||||
if (dataIndex >= oneRowData.size()) {
|
||||
return;
|
||||
}
|
||||
// fix https://github.com/alibaba/easyexcel/issues/1702
|
||||
// fix https://github.com/CodePhiliaX/easyexcel-plus/issues/1702
|
||||
// If there is data, it is written to the next cell
|
||||
maxCellIndex++;
|
||||
|
||||
@ -196,7 +196,7 @@ public class ExcelWriteAddExecutor extends AbstractExcelWriteExecutor {
|
||||
writeContext, row, rowIndex, null, maxCellIndex, relativeRowIndex, Boolean.FALSE, excelContentProperty);
|
||||
WriteHandlerUtils.beforeCellCreate(cellWriteHandlerContext);
|
||||
|
||||
// fix https://github.com/alibaba/easyexcel/issues/1870
|
||||
// fix https://github.com/CodePhiliaX/easyexcel-plus/issues/1870
|
||||
// If there is data, it is written to the next cell
|
||||
Cell cell = WorkBookUtil.createCell(row, maxCellIndex);
|
||||
cellWriteHandlerContext.setCell(cell);
|
||||
|
@ -431,7 +431,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
|
||||
if (!analysisCell.getFirstRow() || !WriteDirectionEnum.VERTICAL.equals(fillConfig.getDirection())) {
|
||||
return;
|
||||
}
|
||||
// fix https://github.com/alibaba/easyexcel/issues/1869
|
||||
// fix https://github.com/CodePhiliaX/easyexcel-plus/issues/1869
|
||||
if (isOriginalCell && PoiUtils.customHeight(row)) {
|
||||
collectionRowHeightCache.put(currentUniqueDataFlag, row.getHeight());
|
||||
return;
|
||||
@ -541,7 +541,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
|
||||
analysisCell.getVariableList().add(variable);
|
||||
if (lastPrepareDataIndex == prefixIndex) {
|
||||
analysisCell.getPrepareDataList().add(StringUtils.EMPTY);
|
||||
// fix https://github.com/alibaba/easyexcel/issues/2035
|
||||
// fix https://github.com/CodePhiliaX/easyexcel-plus/issues/2035
|
||||
if (lastPrepareDataIndex != 0) {
|
||||
analysisCell.setOnlyOneVariable(Boolean.FALSE);
|
||||
}
|
||||
@ -553,7 +553,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
|
||||
}
|
||||
lastPrepareDataIndex = suffixIndex + 1;
|
||||
}
|
||||
// fix https://github.com/alibaba/easyexcel/issues/1552
|
||||
// fix https://github.com/CodePhiliaX/easyexcel-plus/issues/1552
|
||||
// When read template, XLSX data may be in `is` labels, and set the time set in `v` label, lead to can't set
|
||||
// up successfully, so all data format to empty first.
|
||||
if (analysisCell != null && CollectionUtils.isNotEmpty(analysisCell.getVariableList())) {
|
||||
|
@ -19,7 +19,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet;
|
||||
/**
|
||||
* Handle the problem of unable to write dimension.
|
||||
*
|
||||
* https://github.com/alibaba/easyexcel/issues/1282
|
||||
* https://github.com/CodePhiliaX/easyexcel-plus/issues/1282
|
||||
*
|
||||
* @author Jiaju Zhuang
|
||||
*/
|
||||
|
@ -11,7 +11,7 @@
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<url>https://github.com/alibaba/easyexcel</url>
|
||||
<url>https://github.com/CodePhiliaX/easyexcel-plus</url>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>easyexcel-plus-support</artifactId>
|
||||
<name>easyexcel-plus-support</name>
|
||||
|
@ -32,7 +32,7 @@ public class CompatibilityTest {
|
||||
|
||||
@Test
|
||||
public void t01() {
|
||||
// https://github.com/alibaba/easyexcel/issues/2236
|
||||
// https://github.com/CodePhiliaX/easyexcel-plus/issues/2236
|
||||
List<Map<Integer, Object>> list = EasyExcel.read(TestFileUtil.getPath() + "compatibility/t01.xls").sheet()
|
||||
.doReadSync();
|
||||
Assertions.assertEquals(2, list.size());
|
||||
@ -75,7 +75,7 @@ public class CompatibilityTest {
|
||||
|
||||
@Test
|
||||
public void t05() {
|
||||
// https://github.com/alibaba/easyexcel/issues/1956
|
||||
// https://github.com/CodePhiliaX/easyexcel-plus/issues/1956
|
||||
// Excel read date needs to be rounded
|
||||
List<Map<Integer, String>> list = EasyExcel
|
||||
.read(TestFileUtil.getPath() + "compatibility/t05.xlsx")
|
||||
@ -103,7 +103,7 @@ public class CompatibilityTest {
|
||||
|
||||
@Test
|
||||
public void t07() {
|
||||
// https://github.com/alibaba/easyexcel/issues/2805
|
||||
// https://github.com/CodePhiliaX/easyexcel-plus/issues/2805
|
||||
// Excel read date needs to be rounded
|
||||
List<Map<Integer, Object>> list = EasyExcel
|
||||
.read(TestFileUtil.getPath() + "compatibility/t07.xlsx")
|
||||
@ -123,7 +123,7 @@ public class CompatibilityTest {
|
||||
|
||||
@Test
|
||||
public void t08() {
|
||||
// https://github.com/alibaba/easyexcel/issues/2693
|
||||
// https://github.com/CodePhiliaX/easyexcel-plus/issues/2693
|
||||
// Temporary files may be deleted if there is no operation for a long time, so they need to be recreated.
|
||||
File file = TestFileUtil.createNewFile("compatibility/t08.xlsx");
|
||||
EasyExcel.write(file, SimpleData.class)
|
||||
|
@ -11,7 +11,7 @@ import org.apache.poi.ss.usermodel.CreationHelper;
|
||||
import org.apache.poi.ss.usermodel.Hyperlink;
|
||||
|
||||
/**
|
||||
* 自定义拦截器。对第一行第一列的头超链接到:https://github.com/alibaba/easyexcel
|
||||
* 自定义拦截器。对第一行第一列的头超链接到:https://github.com/CodePhiliaX/easyexcel-plus
|
||||
*
|
||||
* @author Jiaju Zhuang
|
||||
*/
|
||||
@ -26,7 +26,7 @@ public class CustomCellWriteHandler implements CellWriteHandler {
|
||||
if (BooleanUtils.isTrue(context.getHead()) && cell.getColumnIndex() == 0) {
|
||||
CreationHelper createHelper = context.getWriteSheetHolder().getSheet().getWorkbook().getCreationHelper();
|
||||
Hyperlink hyperlink = createHelper.createHyperlink(HyperlinkType.URL);
|
||||
hyperlink.setAddress("https://github.com/alibaba/easyexcel");
|
||||
hyperlink.setAddress("https://github.com/CodePhiliaX/easyexcel-plus");
|
||||
cell.setHyperlink(hyperlink);
|
||||
}
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ public class WriteTest {
|
||||
imageDemoData.setString(imagePath);
|
||||
imageDemoData.setInputStream(inputStream);
|
||||
imageDemoData.setUrl(new URL(
|
||||
"https://raw.githubusercontent.com/alibaba/easyexcel/master/src/test/resources/converter/img.jpg"));
|
||||
"https://raw.githubusercontent.com/CodePhiliaX/easyexcel-plus/master/src/test/resources/converter/img.jpg"));
|
||||
|
||||
// 这里演示
|
||||
// 需要额外放入文字
|
||||
@ -330,7 +330,7 @@ public class WriteTest {
|
||||
writeCellDemoData.setHyperlink(hyperlink);
|
||||
HyperlinkData hyperlinkData = new HyperlinkData();
|
||||
hyperlink.setHyperlinkData(hyperlinkData);
|
||||
hyperlinkData.setAddress("https://github.com/alibaba/easyexcel");
|
||||
hyperlinkData.setAddress("https://github.com/CodePhiliaX/easyexcel-plus");
|
||||
hyperlinkData.setHyperlinkType(HyperlinkType.URL);
|
||||
|
||||
// 设置备注
|
||||
@ -642,7 +642,7 @@ public class WriteTest {
|
||||
/**
|
||||
* 下拉,超链接等自定义拦截器(上面几点都不符合但是要对单元格进行操作的参照这个)
|
||||
* <p>
|
||||
* demo这里实现2点。1. 对第一行第一列的头超链接到:https://github.com/alibaba/easyexcel 2. 对第一列第一行和第二行的数据新增下拉框,显示 测试1 测试2
|
||||
* demo这里实现2点。1. 对第一行第一列的头超链接到:https://github.com/CodePhiliaX/easyexcel-plus 2. 对第一列第一行和第二行的数据新增下拉框,显示 测试1 测试2
|
||||
* <p>
|
||||
* 1. 创建excel对应的实体对象 参照{@link DemoData}
|
||||
* <p>
|
||||
|
@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
@Slf4j
|
||||
public class Issue2443Test {
|
||||
//CS304 (manually written) Issue link: https://github.com/alibaba/easyexcel/issues/2443
|
||||
//CS304 (manually written) Issue link: https://github.com/CodePhiliaX/easyexcel-plus/issues/2443
|
||||
@Test
|
||||
public void IssueTest1() {
|
||||
String fileName = TestFileUtil.getPath() + "temp/issue2443" + File.separator + "date1.xlsx";
|
||||
@ -28,7 +28,7 @@ public class Issue2443Test {
|
||||
})).sheet().doRead();
|
||||
}
|
||||
|
||||
//CS304 (manually written) Issue link: https://github.com/alibaba/easyexcel/issues/2443
|
||||
//CS304 (manually written) Issue link: https://github.com/CodePhiliaX/easyexcel-plus/issues/2443
|
||||
@Test
|
||||
public void IssueTest2() {
|
||||
String fileName = TestFileUtil.getPath() + "temp/issue2443" + File.separator + "date2.xlsx";
|
||||
|
@ -11,7 +11,7 @@
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<url>https://github.com/alibaba/easyexcel</url>
|
||||
<url>https://github.com/CodePhiliaX/easyexcel-plus</url>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>easyexcel-plus</artifactId>
|
||||
<name>easyexcel-plus</name>
|
||||
|
34
pom.xml
34
pom.xml
@ -29,14 +29,14 @@
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/alibaba/easyexcel</url>
|
||||
<connection>scm:git:https://git@github.com/alibaba/easyexcel.git</connection>
|
||||
<url>https://github.com/CodePhiliaX/easyexcel-plus</url>
|
||||
<connection>scm:git:https://git@github.com/CodePhiliaX/easyexcel-plus.git</connection>
|
||||
</scm>
|
||||
|
||||
|
||||
<organization>
|
||||
<name>Alibaba Group</name>
|
||||
<url>https://github.com/alibaba</url>
|
||||
<name>Chat2DB</name>
|
||||
<url>https://github.com/CodePhiliaX</url>
|
||||
</organization>
|
||||
|
||||
<developers>
|
||||
@ -75,20 +75,6 @@
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba</groupId>-->
|
||||
<!-- <artifactId>easyexcel</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba</groupId>-->
|
||||
<!-- <artifactId>easyexcel-core</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@ -109,18 +95,6 @@
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-pmd-plugin</artifactId>-->
|
||||
<!-- <version>3.8</version>-->
|
||||
<!-- <dependencies>-->
|
||||
<!--<!– <dependency>–>-->
|
||||
<!--<!– <groupId>com.alibaba.p3c</groupId>–>-->
|
||||
<!--<!– <artifactId>p3c-pmd</artifactId>–>-->
|
||||
<!--<!– <version>1.3.6</version>–>-->
|
||||
<!--<!– </dependency>–>-->
|
||||
<!-- </dependencies>-->
|
||||
<!-- </plugin>-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
|
@ -1,2 +0,0 @@
|
||||
# 请登录官网查看
|
||||
官网地址:[https://alibaba-easyexcel.github.io](https://alibaba-easyexcel.github.io)
|
@ -1,3 +1,3 @@
|
||||
/**
|
||||
* Documents have been migrated to <a href="https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java">https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java</a>
|
||||
* Documents have been migrated to <a href="https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/fill/FillTest.java">https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/fill/FillTest.java</a>
|
||||
*/
|
||||
|
@ -1,3 +1,3 @@
|
||||
/**
|
||||
* Documents have been migrated to <a href="https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java">https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java</a>
|
||||
* Documents have been migrated to <a href="https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/read/ReadTest.java">https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/read/ReadTest.java</a>
|
||||
*/
|
||||
|
@ -1,3 +1,3 @@
|
||||
/**
|
||||
* Documents have been migrated to <a href="https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/web/WebTest.java">https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/web/WebTest.java</a>
|
||||
* Documents have been migrated to <a href="https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/web/WebTest.java">https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/web/WebTest.java</a>
|
||||
*/
|
||||
|
@ -1,3 +1,3 @@
|
||||
/**
|
||||
* Documents have been migrated to <a href="https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java">https://github.com/alibaba/easyexcel/blob/master/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java</a>
|
||||
* Documents have been migrated to <a href="https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/write/WriteTest.java">https://github.com/CodePhiliaX/easyexcel-plus/blob/master/easyexcel-test/src/test/java/com/CodePhiliaX/easyexcel-plus/test/demo/write/WriteTest.java</a>
|
||||
*/
|
||||
|
@ -1,29 +0,0 @@
|
||||
## 统一代码风格
|
||||
如果要编辑本项目,一定要统一代码风格
|
||||
### 统一方案
|
||||
本工程代码遵守阿里巴巴[p3c](https://github.com/alibaba/p3c)规范,在代码开发前建议:
|
||||
* 安装阿里巴巴规约插件,用于提早发现不规范代码,具体安装方法参照:[p3c](https://github.com/alibaba/p3c),里面有eclipse,idea的安装方法
|
||||
* 安装codeStyle插件,用于格式化代码的时候符合代码规范,安装方法见:[安装codeStyle插件](#codeStyleInstall)
|
||||
* checkStyle校验,这个不用安装,`mvn`在编译的时候自己会调用,写在`pom.xml`里,用`maven-pmd-plugin`调用`pmd-p3c`规范校验
|
||||
|
||||
如果工作中遇到代码格式化问题,经常导致git冲突,也可以采用上面的方案
|
||||
### codeStyle插件安装<span id="codeStyleInstall"/>
|
||||
这里注意下,不管eclipse或者idea,都需要导入eclipse文件夹下面的配置
|
||||
#### eclipse
|
||||
* 依次点击:`Window->Preferences->Java->Code Style->Formatter->Import`
|
||||
* 选择`style/eclipse/codestyle.xml`文件 确定
|
||||
* 默认在`Active profile`中选择新导入的`P3C-CodeStyle`,如未选择,请手动选择
|
||||
* 点击`Apply`完成配置
|
||||

|
||||
#### idea
|
||||
* 依次点击进入插件界面:`File->Settings->Plugins`,搜索 eclipse code formatter,如已有插件则不需安装,如没有,点击Search in repositories自动搜索线上插件。
|
||||

|
||||
* 导入`style/eclipse/codestyle.xml` 这里记住用的也是eclipse里面的 点击OK
|
||||

|
||||
* 依次点击进入插件界面:`File->Settings->Editor->Code Style->Java->Import Scheme->Intellij IDEA code style XML`,导入`style/idea/codestyle.xml` 这里用的是idea的配置文件
|
||||

|
||||
* 完成
|
||||
|
||||
### 附
|
||||
#### windows系统,代码规范校验提示乱码
|
||||
这个是因为cmd默认gbk,cmd输入:`CHCP 65001` 在运行mvn 提示就是不会乱码了
|
455
update.md
455
update.md
@ -1,455 +0,0 @@
|
||||
# 4.0.3
|
||||
|
||||
* 兼容部分日期格式读取异常的问题
|
||||
|
||||
# 4.0.2
|
||||
|
||||
* 兼容某些特殊的xls: 修改了内置的样式导致判断样式错误
|
||||
* 重新加回 `commons-io`
|
||||
|
||||
# 4.0.1
|
||||
|
||||
* `commons-io` 修改为依赖 `poi`的版本
|
||||
* 修复临时目录被清理可能提示`NoSuchFileException`的异常
|
||||
|
||||
# 4.0.0
|
||||
|
||||
* `poi`由`4.1.2`升级到`5.2.5`
|
||||
* `commons-csv`由`1.1.0`升级到`1.10.0`
|
||||
* `slf4j-api`由`1.7.32`升级到`1.7.36`
|
||||
* `ehcache`由`3.9.9`升级到`3.9.11`
|
||||
* 支持`jdk21`
|
||||
|
||||
# 3.3.4
|
||||
|
||||
* 支持停止单个`sheet`以后继续读取其他`sheet`,使用`ExcelAnalysisStopSheetException`
|
||||
|
||||
# 3.3.3
|
||||
|
||||
* 兼容某些特殊的xls: 缺少每个sheet的终止符
|
||||
|
||||
# 3.3.2
|
||||
|
||||
* 修复`includeColumnIndexes`和`includeColumnFieldNames`在sheet后面失效的问题
|
||||
|
||||
# 3.3.1
|
||||
|
||||
* 修改版本发布问题
|
||||
|
||||
# 3.3.0
|
||||
|
||||
* 读csv会忽略BOM数据 [Issue #3137](https://github.com/alibaba/easyexcel/issues/3137)
|
||||
* 解决csv用office打开乱码的问题,写csv默认带上BOM数据
|
||||
* xlsx存在隐藏字符时需要忽略,确保和展示看到的一样
|
||||
* 新增`commons-io` 2.11.0 包
|
||||
* 在`easyexcel-parent` 包中移除测试包的`dependencyManagement`
|
||||
* 删除`org.apache.poi.hssf.usermodel.PoiUtils.java`,
|
||||
使用反射获取 [Issue #2804](https://github.com/alibaba/easyexcel/issues/2804)
|
||||
* 默认对象反射缓存改成`ThreadLocal`
|
||||
,并支持设置反射缓存类型 [Issue #2792](https://github.com/alibaba/easyexcel/issues/2792)
|
||||
* 支持根据`includeColumnIndexes`和`includeColumnFieldNames`
|
||||
排序 [Issue #2697](https://github.com/alibaba/easyexcel/issues/2697)
|
||||
* 根据文件流解析,由抛出异常改为,默认识别为csv
|
||||
|
||||
# 3.2.1
|
||||
|
||||
* 兼容`LocalDate` [Issue #2908](https://github.com/alibaba/easyexcel/issues/2908)
|
||||
* 优化大文件内存存储,减少内存占用 [Issue #2657](https://github.com/alibaba/easyexcel/issues/2657)
|
||||
* 在临时文件被删除的情况下能正常的读取 [Issue #2693](https://github.com/alibaba/easyexcel/issues/2693)
|
||||
* 分页读取监听器支持自定义分页条数 [Issue #2383](https://github.com/alibaba/easyexcel/issues/2383)
|
||||
|
||||
# 3.2.0
|
||||
|
||||
* 修复部分xlsx读取日期可能相差1秒的bug [Issue #1956](https://github.com/alibaba/easyexcel/issues/1956)
|
||||
* 修复部分数据精度和excel不匹配的bug [Issue #2805](https://github.com/alibaba/easyexcel/issues/2805)
|
||||
* 不创建对象的读支持读取原始的数据类型
|
||||
|
||||
# 3.1.5
|
||||
|
||||
* 提高xlsx读取兼容性:兼用ns2开头的标签
|
||||
|
||||
# 3.1.4
|
||||
|
||||
* 提高xlsx读取兼容性:在存在第一行很多空
|
||||
* 列的情况下,忽略空列
|
||||
|
||||
# 3.1.3
|
||||
|
||||
* 提高xlsx兼容性:兼容`sharedStrings.xml` 存在 `x:t`标签的情况
|
||||
|
||||
# 3.1.2
|
||||
|
||||
* 修复长时间运行会产生大对象的bug [Issue #2725](https://github.com/alibaba/easyexcel/issues/2725)
|
||||
|
||||
# 3.1.1
|
||||
|
||||
* 修复部分xlsx无法读取超链接的bug
|
||||
|
||||
# 3.1.0
|
||||
|
||||
* 支持jdk17,去除cglib&asm依赖,改成重新拷贝一份 [Issue #2240](https://github.com/alibaba/easyexcel/issues/2240)
|
||||
* 升级ehcache 到 3.9.9 ,为了兼容jdk17
|
||||
* 在有样式没有数据的情况下也算空行 [Issue #2294](https://github.com/alibaba/easyexcel/issues/2294)
|
||||
* 修复无法根据文件流判断csv的bug [Issue #2297](https://github.com/alibaba/easyexcel/issues/2297)
|
||||
* 修复CSV不关闭流的bug [Issue #2309](https://github.com/alibaba/easyexcel/issues/2309)
|
||||
* 修复`filed`拼接错误 [Issue #2390](https://github.com/alibaba/easyexcel/issues/2390)
|
||||
* 修复`BigIntegerStringConverter`无效的bug [Issue #2325](https://github.com/alibaba/easyexcel/issues/2325)
|
||||
* 修复03版本无法读取到公式格式的bug [Issue #2444](https://github.com/alibaba/easyexcel/issues/2444)
|
||||
* 提高类型转换兼容性 [Issue #2443](https://github.com/alibaba/easyexcel/issues/2443)
|
||||
* 捕获`setFeature`异常不影响主流程 [Issue #2054](https://github.com/alibaba/easyexcel/issues/2054)
|
||||
* 增加部分`xls`容错 [Issue #2236](https://github.com/alibaba/easyexcel/issues/2236)
|
||||
* 修复读取csv文件时`autoTrim`配置失效 [Issue #2227](https://github.com/alibaba/easyexcel/issues/2227)
|
||||
* csv支持设置读写编码 [Issue #2404](https://github.com/alibaba/easyexcel/issues/2404)
|
||||
* 读写支持`try-with-resources`语法糖
|
||||
|
||||
# 3.0.5
|
||||
|
||||
* 修复`ReadListener` 转换异常不抛出的问题
|
||||
|
||||
# 3.0.4
|
||||
|
||||
* 调整读写默认大小,防止大批量写的时候可能会full gc
|
||||
* `fill`的情况新增 `afterRowDispose`事件
|
||||
|
||||
# 3.0.3
|
||||
|
||||
* 修复`HeadStyle`无效的bug
|
||||
|
||||
# 3.0.2
|
||||
|
||||
* 大幅提升读写性能
|
||||
* 修复列宽注解没用的bug [Issue #2151](https://github.com/alibaba/easyexcel/issues/2151)
|
||||
* 修复`CellData`接收失败的的bug [Issue #2147](https://github.com/alibaba/easyexcel/issues/2147)
|
||||
|
||||
# 3.0.1
|
||||
|
||||
* 升级到正式版
|
||||
* 修复填充样式可能丢失的问题 [Issue #2124](https://github.com/alibaba/easyexcel/issues/2124)
|
||||
* 修复填充数据为空 可能NPE的bug
|
||||
* 修复填充样式可能不生效bug
|
||||
* 修复样式可能超过最大限制的bug
|
||||
* 修复写入过慢的bug
|
||||
|
||||
# 3.0.0-beta3
|
||||
|
||||
* 修复导出浮点型数据可能精度异常的bug
|
||||
|
||||
# 3.0.0-beta2
|
||||
|
||||
* 优化写入样式
|
||||
|
||||
# 3.0.0-beta1
|
||||
|
||||
* 升级jdk8 不再支持jdk6 jdk7
|
||||
* 升级poi 到 4.1.2
|
||||
* 升级cglib 到 3.3.0
|
||||
* 升级ehcache 到 3.8.1
|
||||
* 支持非驼峰的字段读写
|
||||
* 支持csv的读&写
|
||||
* 修复`CellData`可能不返回行列号 [Issue #1832](https://github.com/alibaba/easyexcel/issues/1832)
|
||||
* 优化读取性能
|
||||
* 修复部分情况下不抛出异常
|
||||
* 07版在导出的时候会导出 行数 [Issue #1282](https://github.com/alibaba/easyexcel/issues/1282)
|
||||
* 修复没有样式的情况下空指针异常 [Issue #1738](https://github.com/alibaba/easyexcel/issues/1738)
|
||||
* 修改异常抛出逻辑 [Issue #1618](https://github.com/alibaba/easyexcel/issues/1618)
|
||||
* 兼容一些非官方excel的情况 [Issue #1527](https://github.com/alibaba/easyexcel/issues/1527)
|
||||
* 修改读的关闭流无效 [Issue #1840](https://github.com/alibaba/easyexcel/issues/1840)
|
||||
* 写入支持Collection [Issue #1834](https://github.com/alibaba/easyexcel/issues/1834)
|
||||
* `Converter`支持null转换 [Issue #1776](https://github.com/alibaba/easyexcel/issues/1776)
|
||||
* cglib 新增命名策略,防止和`spring`的冲突 [Issue #2064](https://github.com/alibaba/easyexcel/issues/2064)
|
||||
* 修改填充可能填充错误的bug [Issue #2035](https://github.com/alibaba/easyexcel/issues/2035)
|
||||
* 修复无对象读 返回map的size可能会头的size不一致 [Issue #2014](https://github.com/alibaba/easyexcel/issues/2014)
|
||||
* 修复合并头可能异常的bug [Issue #1662](https://github.com/alibaba/easyexcel/issues/1662)
|
||||
* 修复填充调用横向样式策略报错 [Issue #1651](https://github.com/alibaba/easyexcel/issues/1651)
|
||||
* 修复不自动行高的问题 [Issue #1869](https://github.com/alibaba/easyexcel/issues/1869)
|
||||
* 新增头的非空校验 [Issue #1765](https://github.com/alibaba/easyexcel/issues/1765)
|
||||
* 修复某些特殊的excel读取失败的问题 [Issue #1595](https://github.com/alibaba/easyexcel/issues/1595)
|
||||
* 修复不创建对象写入数据异常 [Issue #1702](https://github.com/alibaba/easyexcel/issues/1702)
|
||||
* 修复头和数据对象不一致会覆盖的问题 [Issue #1870](https://github.com/alibaba/easyexcel/issues/1870)
|
||||
* 修复忽略字段后可能排序不一致的问题
|
||||
* 修改填充时,无法使用生成的模板 [Issue #1552](https://github.com/alibaba/easyexcel/issues/1552)
|
||||
* 修改填充可以不自动继承样式 [Issue #1710](https://github.com/alibaba/easyexcel/issues/1710)
|
||||
* 修复填充数据不能为空的问题 [Issue #1703](https://github.com/alibaba/easyexcel/issues/1703)
|
||||
* 新增部分jdk8特性
|
||||
|
||||
# 2.2.11
|
||||
|
||||
* 修复有些xlsx解析失败的bug [Issue #1595](https://github.com/alibaba/easyexcel/issues/1595)
|
||||
|
||||
# 2.2.10
|
||||
|
||||
* 修复读取的时候用string接收数字 可能四舍五入不一致的bug
|
||||
|
||||
# 2.2.9
|
||||
|
||||
* 修复读取的时候用string接收数字 可能四舍五入不一致的bug
|
||||
|
||||
# 2.2.8
|
||||
|
||||
* 兼容07在特殊的excel的情况下,读取数据异常
|
||||
|
||||
# 2.2.7
|
||||
|
||||
* 修改07在特殊情况下用`String`接收数字会丢小数位的bug
|
||||
|
||||
# 2.2.6
|
||||
|
||||
* 修改跳着读取03版本空指针bug
|
||||
|
||||
# 2.2.5
|
||||
|
||||
* `ExcelProperty`新增`order` 用于排序
|
||||
* 修复导出指定`index`会导致空行的bug
|
||||
|
||||
# 2.2.4
|
||||
|
||||
* 撤销删除`AbstractMergeStrategy`
|
||||
* 修改默认用String读取数字不使用科学计数法 通过`useScientificFormat`修改
|
||||
* 修复07版仅有样式的空行 默认不忽略的bug
|
||||
* 写入`sheet`不设置`index`和`name`默认不为0的问题
|
||||
* 修复多个`sheet`不按照顺序写入 会乱序的bug [Issue #1332](https://github.com/alibaba/easyexcel/issues/1332)
|
||||
* 修改head是List时,内容单元格的样式不生效 [Issue #1339](https://github.com/alibaba/easyexcel/issues/1339)
|
||||
* 修复xls仅公式行 不读取的bug [Issue #1324](https://github.com/alibaba/easyexcel/issues/1324)
|
||||
* 修复xls直接读取第2页 `NPE` 的bug [Issue #1280](https://github.com/alibaba/easyexcel/issues/1280)
|
||||
* 修复填充的时候,最后一行中间有空行会创建失败的bug
|
||||
* 修复`includeColumnIndexes`不包含第列
|
||||
会无法导出数据的bug [Issue #1346](https://github.com/alibaba/easyexcel/issues/1346)
|
||||
* 修复`@NumberFormat`注解转换double时可能会丢失精度 [Issue #1306](https://github.com/alibaba/easyexcel/issues/1306)
|
||||
|
||||
# 2.2.3
|
||||
|
||||
* 修改填充数据空数据的bug [Issue #1274](https://github.com/alibaba/easyexcel/issues/1274)
|
||||
* 回退自定义转换器入参为空
|
||||
|
||||
# 2.2.2
|
||||
|
||||
* 修改`sheet`事件未调用的bug
|
||||
* 修复复杂表头不是`index=0`开始 合并异常的bug [Issue #1322](https://github.com/alibaba/easyexcel/issues/1322)
|
||||
|
||||
# 2.2.1
|
||||
|
||||
* 发布正式版
|
||||
* 修复第一行为空不会调用`invokeHeadMap`的bug [Issue #993](https://github.com/alibaba/easyexcel/issues/993)
|
||||
*
|
||||
|
||||
当类的属性没有按照ExcelProperty的属性index顺序排序的时候,写数据出现错乱 [Issue #1046](https://github.com/alibaba/easyexcel/issues/1046)
|
||||
|
||||
* 新增支持自定义转换器 入参可以为空 实现`NullableObjectConverter`
|
||||
即可 [Issue #1084](https://github.com/alibaba/easyexcel/issues/1084)
|
||||
* 修复xls丢失结束标记的情况下 会漏读最后一行
|
||||
* 修复填充的时候 多次`forceNewRow` 空指针的bug [Issue #1201](https://github.com/alibaba/easyexcel/issues/1201)
|
||||
* 修复`table`、`sheet`中创建的拦截器不执行`workbook`
|
||||
事件的bug [Issue #1202](https://github.com/alibaba/easyexcel/issues/1202)
|
||||
|
||||
# 2.2.0-beta2
|
||||
|
||||
* 修复最长匹配策略不同表格会有影响的bug [Issue #1010](https://github.com/alibaba/easyexcel/issues/1010)
|
||||
* `LinkedList`写入的性能问题 #1121
|
||||
* 修复在某些情况下可能出现不必要的`warn`日志
|
||||
|
||||
# 2.2.0-beta1
|
||||
|
||||
* 重写主流程,代码更加优雅
|
||||
* 修复用String接收日期、数字和excel显示不一致的bug(不是完美修复,但是大部分情况已经兼容)
|
||||
* 降低Ehcache版本 3.7.1(jkd7) -> 3.4.0(jdk6)
|
||||
* 修复xls 用Map接收时多次接收会是同一个对象的bug
|
||||
* 修复浮点型数据导入到excel 会丢失精度的bug
|
||||
* 新增支持读取批注、超链接、合并单元格
|
||||
* 如果是`RuntimeException`则不再封装对象
|
||||
* 新增`CellData`可以获取行列号
|
||||
* 新增样式注解
|
||||
* 新增合并单元格注解
|
||||
* 提升合并策略效率
|
||||
* 兼容部分比较特殊的excel
|
||||
* 同时传入了`List<List<String>>`和`class`的head,会通过index去匹配注解
|
||||
* 修复读取转换器的并发问题
|
||||
* 填充支持多个List对象
|
||||
|
||||
# 2.1.7
|
||||
|
||||
* 修复使用1+版本的写法,第1条开始读修改为第0条开始读
|
||||
|
||||
# 2.1.6
|
||||
|
||||
* 修复写入只有`sheetName`会抛异常
|
||||
|
||||
# 2.1.5
|
||||
|
||||
* 修复部分xlsx没有行号读取异常
|
||||
* 填充时候支持根据`sheetName`定位`sheet`
|
||||
|
||||
# 2.1.4
|
||||
|
||||
* 新增参数`useDefaultListener` 可以排除默认对象转换
|
||||
|
||||
# 2.1.3
|
||||
|
||||
* 每个java进程单独创建一个缓存目录 [Issue #813](https://github.com/alibaba/easyexcel/issues/813)
|
||||
* 统一修改合并为unsafe,提高大量数据导出的合并的效率
|
||||
* 修改merge返回参数`relativeRowIndex`为`Integer`
|
||||
* 新增参数`automaticMergeHead` 可以设置不自动合并头 [Issue #822](https://github.com/alibaba/easyexcel/issues/822)
|
||||
* 新增参数`xlsxSAXParserFactoryName` 可以指定`SAXParserFactory`
|
||||
* 修复合并策略 空指针的问题
|
||||
* `SimpleColumnWidthStyleStrategy` 新增 参数`columnIndex` [Issue #806](https://github.com/alibaba/easyexcel/issues/806)
|
||||
|
||||
# 2.1.2
|
||||
|
||||
* 修复强制创建新行填充,只有一行数据会未填充的bug
|
||||
|
||||
# 2.1.1
|
||||
|
||||
* 发布正式版
|
||||
* 修改map返回为LinkedHashMap
|
||||
* 修改同步读取返回对象支持泛型
|
||||
* 修复03版不能直接读取第二个sheet的bug [Issue #772](https://github.com/alibaba/easyexcel/issues/772)
|
||||
* 新增支持图片导出用URL [Issue #774](https://github.com/alibaba/easyexcel/issues/774)
|
||||
* 加入多次关闭判断,防止多次关闭异常
|
||||
* 加入根据模板自动识别导出的excel类型
|
||||
* 修改默认失败后,不再往文件流写入数据。通过参数`writeExcelOnException` 参数设置异常了也要写入前面的数据。
|
||||
* 循环合并策略支持一次性合并多列
|
||||
* `ExcelDataConvertException`返回新增具体报错的数据
|
||||
* 加入解析class缓存
|
||||
* 修复填充的时候行高不复制的Bug [Issue #780](https://github.com/alibaba/easyexcel/issues/780)
|
||||
* 修复03版无法获取大概总行数的bug
|
||||
|
||||
# 2.1.0-beta4
|
||||
|
||||
* 修改最长匹配策略会空指针的bug [Issue #747](https://github.com/alibaba/easyexcel/issues/747)
|
||||
* 修改afterRowDispose错误 [Issue #751](https://github.com/alibaba/easyexcel/issues/751)
|
||||
* 修复多个头的情况下会读取数据为空
|
||||
|
||||
# 2.1.0-beta3
|
||||
|
||||
* 支持强行指定在内存处理,以支持备注、RichTextString等的写入
|
||||
* 修复关闭流失败,可能会不删除临时文件的问题
|
||||
* 支持根据参数自定义导出列
|
||||
* 修改最长匹配策略的最大长度 [Issue #734](https://github.com/alibaba/easyexcel/issues/734)
|
||||
* 修复策略头未生效的bug [Issue #735](https://github.com/alibaba/easyexcel/issues/735)
|
||||
* 修复填充的时候有数字会异常
|
||||
|
||||
# 2.1.0-beta2
|
||||
|
||||
* 修改模板通过流创建报错的bug
|
||||
* 修复空数据未替换掉的bug
|
||||
* 修复空模板会空一行的bug
|
||||
|
||||
# 2.1.0-beta1
|
||||
|
||||
* 新增支持导入、导出支持公式
|
||||
* 新增支持读取单元格类型、写入指定单元格类型
|
||||
* 支持通过模板填充数据
|
||||
* 新增写支持 禁用头样式 `useDefaultStyle`
|
||||
* 用map读取数据 空的单元格也会有个 null的数据
|
||||
* 转换报错 能获取到对应的行号和列号
|
||||
* 优化读取全部sheet方案
|
||||
* 新增注解`ExcelIgnoreUnannotated` 支持忽略未加`ExcelProperty`注解的字段
|
||||
* 支持导出加密 [Issue #361](https://github.com/alibaba/easyexcel/issues/361)
|
||||
* 支持导入加密 [Issue #295](https://github.com/alibaba/easyexcel/issues/295)
|
||||
|
||||
# 2.0.5
|
||||
|
||||
* 优化07版超大文件读取方案
|
||||
* 支持自己设置超大文件读取参数
|
||||
* 读取xlsx会改变修改时间的bug [Issue #574](https://github.com/alibaba/easyexcel/issues/574)
|
||||
* 默认读取忽略空行 根据参数ignoreEmptyRow参数设置
|
||||
|
||||
# 2.0.4
|
||||
|
||||
* 修复07版整个excel仅存在数字时会出现的NPE
|
||||
* 修复03版 用String接收电话会出现科学计数法的问题
|
||||
|
||||
# 2.0.3
|
||||
|
||||
* 修复重大bug 在07版读取文件的时候 小概率导致数字部分丢失
|
||||
|
||||
# 2.0.2
|
||||
|
||||
* 修复xls无法获取sheetList的bug [Issue #621](https://github.com/alibaba/easyexcel/issues/621)
|
||||
* 修复监听器转换异常会重复提示的bug
|
||||
|
||||
# 2.0.1
|
||||
|
||||
* 降级poi为3.17 兼容jdk6
|
||||
|
||||
# 2.0.0
|
||||
|
||||
* 修复当cell为空可能会抛出空指针的bug
|
||||
* 修复电话等长数字可能出现科学计数法的问题 [Issue #583](https://github.com/alibaba/easyexcel/issues/583)
|
||||
* 升级为正式版
|
||||
|
||||
# 2.0.0-beta6
|
||||
|
||||
* 修复空行读取空指针异常
|
||||
* 修复写入指定头为List<List<String>>,但是数据用List<Class>导致的空指针
|
||||
|
||||
# 2.0.0-beta5
|
||||
|
||||
* 修复在读取值的时候读取了额外值导致数据转换异常
|
||||
|
||||
# 2.0.0-beta4
|
||||
|
||||
* 修改在传入List<List<Object>>判断行数错误 [Issue #526](https://github.com/alibaba/easyexcel/issues/526)
|
||||
* 修复在mac 2016 2017导出的excel 可能存在多余字段的问题
|
||||
* 修复03版 读取无法指定sheet的问题 [Issue #533](https://github.com/alibaba/easyexcel/issues/533)
|
||||
|
||||
# 2.0.0-beta3
|
||||
|
||||
* 导出完成移除临时目录 [Issue #386](https://github.com/alibaba/easyexcel/issues/386)
|
||||
* 新增读取返回头数据
|
||||
|
||||
# 2.0.0-beta2
|
||||
|
||||
* 加速gc回收 [Issue #511](https://github.com/alibaba/easyexcel/issues/511)
|
||||
* 修改空字符串读取可能读取上个字段的数据的bug
|
||||
* 修改换行数据无法读取的bug [Issue #521](https://github.com/alibaba/easyexcel/issues/521)
|
||||
* 修复在空字符串的时候 格式转换异常 [Issue #520](https://github.com/alibaba/easyexcel/issues/520)
|
||||
|
||||
# 2.0.0-beta1
|
||||
|
||||
* 优化读写逻辑
|
||||
* 优化读写对外接口
|
||||
* 加入转换器,方便格式转换
|
||||
* 极大优化读大文件的内存和效率
|
||||
* sheetNo 改成0开始
|
||||
* 读支持指定列名
|
||||
* 升级poi 到4.0.1
|
||||
|
||||
# 1.2.4
|
||||
|
||||
修复read()方法存在的bug
|
||||
|
||||
# 1.2.1
|
||||
|
||||
修复POI在大并发情况下创建临时目录失败的bug
|
||||
|
||||
# 1.0.9
|
||||
|
||||
修复excel超过16列被覆盖的问题,修复数据只有一行时候无法透传的bug。
|
||||
|
||||
# 1.0.8
|
||||
|
||||
如果整行excel数据全部为空,则不解析返回。完善多sheet的解析。
|
||||
|
||||
# 1.0.6
|
||||
|
||||
增加@ExcelColumnNum,修复字符串前后空白,增加过滤功能。
|
||||
|
||||
# 1.0.5
|
||||
|
||||
优化类型转换的性能。
|
||||
|
||||
# 1.0.4
|
||||
|
||||
修复日期类型转换时候数字问题。基础模型支持字段类型int,long,double,boolean,date,string
|
||||
|
||||
# 1.0.3
|
||||
|
||||
修复无@ExcelProperty标注的多余字段时候报错。
|
||||
|
||||
# 1.0.2
|
||||
|
||||
修复拿到一行数据后,存到list中,但最后处理时候变为空的bug。
|
||||
|
||||
# 1.0.1
|
||||
|
||||
完善测试用例,防止歧义,模型字段映射不上时候有抛异常,改为提醒。
|
Loading…
x
Reference in New Issue
Block a user