Skip to content

Commit 2c8d0ab

Browse files
Merge pull request #169 from CodePhiliaX/feature-1.x
montly release to 1.1.0
2 parents 498791a + b2f8b6b commit 2c8d0ab

Some content is hidden

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

45 files changed

+403
-1070
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- 请确保你已经阅读并理解了贡献指南 -->
2+
3+
### Ⅰ. 描述这个 PR 做了什么
4+
5+
### Ⅱ. 这个 pull request 是否修复了一个问题?
6+
<!-- 如果是,请在下一行添加“fix #xxx”,例如 fix #97。-->
7+
8+
### Ⅲ. 为什么不需要添加测试用例(单元测试/集成测试)?
9+
10+
### Ⅳ. 描述如何验证它
11+
12+
### Ⅴ. 评审的特别说明

Diff for: CONTRIBUTING.md

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# 为 FastExcel 做贡献
2+
3+
FastExcel 欢迎社区的每一位用户和开发者成为贡献者。无论是报告问题、改进文档、提交代码,还是提供技术支持,您的参与都将帮助 FastExcel 变得更好。
4+
5+
---
6+
7+
## 报告问题
8+
9+
我们鼓励用户在使用 FastExcel 的过程中随时提供反馈。您可以通过 [NEW ISSUE](https://github.com/CodePhiliaX/fastexcel/issues/new/choose) 提交问题。
10+
11+
### 高质量问题报告
12+
13+
为了提高沟通效率,请在提交问题前:
14+
1. **搜索现有问题**:检查您的问题是否已被报告。如果存在,请直接在现有问题下评论补充详细信息,而不是创建新问题。
15+
2. **使用问题模板**:问题模板位于 [ISSUE TEMPLATE](./.github/ISSUE_TEMPLATE),请按照模板要求填写,以确保问题描述准确且完整。
16+
17+
以下情况适合提交新问题:
18+
- Bug 报告
19+
- 新功能需求
20+
- 性能问题
21+
- 功能提案或设计
22+
- 文档改进
23+
- 测试覆盖率优化
24+
- 需要技术支持
25+
- 其他与项目相关的问题
26+
27+
> **注意**:请勿在问题中包含敏感信息,如密码、密钥、服务器地址或私人数据。
28+
29+
---
30+
31+
## 贡献代码与文档
32+
33+
所有对 FastExcel 的改进均可通过 Pull Request (PR) 实现。无论是修复 Bug、优化代码、增强功能,还是改进文档,都非常欢迎!
34+
35+
### 您可以贡献的方向
36+
- 修复错别字
37+
- 修复 Bug
38+
- 删除冗余代码
39+
- 添加测试用例
40+
- 增强功能
41+
- 添加注释以提升代码可读性
42+
- 优化代码结构
43+
- 改进或完善文档
44+
45+
**原则****任何有助于项目改进的 PR 都值得鼓励!**
46+
47+
在提交 PR 前,请熟悉以下指南:
48+
1. [工作区准备](#工作区准备)
49+
2. [分支定义](#分支定义)
50+
3. [提交规则](#提交规则)
51+
4. [PR 说明](#pr说明)
52+
53+
---
54+
55+
### 工作区准备
56+
57+
确保您已注册 GitHub 账号,并按照以下步骤完成本地开发环境配置:
58+
1. **Fork 仓库**:在 FastExcel 的 [GitHub 页面](https://github.com/CodePhiliaX/fastexcel) 点击 `Fork` 按钮,将项目复制到您的 GitHub 账户下,例如:`https://github.com/<your-username>/fastexcel`
59+
2. **克隆代码库**:运行以下命令将 Fork 的项目克隆到本地:
60+
```bash
61+
git clone [email protected]:<your-username>/fastexcel.git
62+
```
63+
3. **设置上游仓库**:将官方仓库设置为 `upstream`,方便同步更新:
64+
```bash
65+
git remote add upstream [email protected]:CodePhiliaX/fastexcel.git
66+
git remote set-url --push upstream no-pushing
67+
```
68+
运行 `git remote -v` 可检查配置是否正确。
69+
70+
---
71+
72+
### 分支定义
73+
74+
在 FastExcel 中,所有贡献应基于 `main` 开发分支。此外,还有以下分支类型:
75+
- **release 分支**:用于版本发布(如 `0.6.0`, `0.6.1`)。
76+
- **feature 分支**:用于开发较大的功能。
77+
- **hotfix 分支**:用于修复重要 Bug。
78+
79+
提交 PR 时,请确保变更基于 `main` 分支。
80+
81+
---
82+
83+
### 提交规则
84+
85+
#### 提交信息
86+
请确保提交消息清晰且具有描述性,遵循以下格式:
87+
- **docs**: 更新文档,例如 `docs: 更新 PR 提交指南`
88+
- **feature**: 新功能,例如 `feature: 支持 并发写入`
89+
- **bugfix**: 修复 Bug,例如 `bugfix: 修复空指针异常`
90+
- **refactor**: 重构代码,例如 `refactor: 优化数据处理逻辑`
91+
- **test**: 增加或改进测试,例如 `test: 添加单元测试`
92+
93+
不建议使用模糊的提交信息,如:
94+
- ~~修复问题~~
95+
- ~~更新代码~~
96+
97+
如果需要帮助,请参考 [如何编写 Git 提交消息](http://chris.beams.io/posts/git-commit/)
98+
99+
#### 提交内容
100+
一次提交应包含完整且可审查的更改,确保:
101+
- 避免提交过于庞大的改动。
102+
- 每次提交内容独立且可通过 CI 测试。
103+
104+
另外,请确保提交时配置正确的 Git 用户信息:
105+
```bash
106+
git config --get user.name
107+
git config --get user.email
108+
```
109+
110+
---
111+
112+
### PR 说明
113+
114+
为了帮助审阅者快速了解 PR 的内容和目的,请使用 [PR 模板](.github/PULL_REQUEST_TEMPLATE/pull_request_template.md)。详细的描述将极大提高代码审阅效率。
115+
116+
---
117+
118+
## 测试用例贡献
119+
120+
任何测试用例的贡献都值得鼓励,尤其是单元测试。建议在对应模块的 `test` 目录中创建 `XXXTest.java` 文件,推荐使用 JUnit5 框架。
121+
122+
---
123+
124+
## 其他参与方式
125+
126+
除了直接贡献代码,以下方式同样是对 FastExcel 的宝贵支持:
127+
- 回答其他用户的问题。
128+
- 帮助审阅他人的 PR。
129+
- 提出改进建议。
130+
- 撰写技术博客,宣传 FastExcel。
131+
- 在社区中分享项目相关知识。
132+
133+
---
134+
135+
## 代码风格
136+
137+
请遵循 [阿里巴巴 Java 编码规范](https://alibaba.github.io/Alibaba-Java-Coding-Guidelines/) 进行代码编写。
138+
您可以选择安装以下插件(非必需)以帮助检查代码风格:
139+
- **IntelliJ IDEA 插件**[安装指南](https://github.com/alibaba/p3c/blob/master/idea-plugin/README.md)
140+
- **Eclipse 插件**[安装指南](https://github.com/alibaba/p3c/blob/master/eclipse-plugin/README.md)
141+
142+
---
143+
144+
**最后,感谢您对 FastExcel 的支持!每一份帮助,都是我们前进的动力。**

Diff for: README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,22 @@ FastExcel 将始终坚持免费开源,并采用最开放的 MIT 协议,使
3737

3838
> 当前 FastExcel 底层使用 poi 作为基础包,如果您的项目中已经有 poi 相关组件,需要您手动排除 poi 的相关 jar 包。
3939
40+
## 更新
41+
您可以在 [版本升级详情](update.md) 中查询到具体的版本更新细节。 您也可以在[Maven 中心仓库](https://mvnrepository.com/artifact/cn.idev.excel/fastexcel)中查询到所有的版本。
4042
### Maven
4143
如果您使用 Maven 进行项目构建,请在 `pom.xml` 文件中引入以下配置:
4244
```xml
4345
<dependency>
4446
<groupId>cn.idev.excel</groupId>
4547
<artifactId>fastexcel</artifactId>
46-
<version>1.0.0</version>
48+
<version>1.1.0</version>
4749
</dependency>
4850
```
4951
### Gradle
5052
如果您使用 Gradle 进行项目构建,请在 `build.gradle` 文件中引入以下配置:
5153
```gradle
5254
dependencies {
53-
implementation 'cn.idev.excel:fastexcel:1.0.0'
55+
implementation 'cn.idev.excel:fastexcel:1.1.0'
5456
}
5557
```
5658
## EasyExcel 与 FastExcel 的区别
@@ -75,7 +77,7 @@ dependencies {
7577
<dependency>
7678
<groupId>cn.idev.excel</groupId>
7779
<artifactId>fastexcel</artifactId>
78-
<version>1.0.0</version>
80+
<version>1.1.0</version>
7981
</dependency>
8082
```
8183

Diff for: README_EN.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ 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.0.0</version>
40+
<version>1.1.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.0.0'
48+
implementation 'cn.idev.excel:fastexcel:1.1.0'
4949
}
5050
```
51+
## Update
52+
For detailed update logs, refer to [Details of version updates](update.md). You can also find all available versions in the [Maven Central Repository](https://mvnrepository.com/artifact/cn.idev.excel/fastexcel).
5153

5254
## Differences Between EasyExcel and FastExcel
5355
- FastExcel supports all the features of EasyExcel but with better performance and stability.
@@ -71,7 +73,7 @@ Replace with:
7173
<dependency>
7274
<groupId>cn.idev.excel</groupId>
7375
<artifactId>fastexcel</artifactId>
74-
<version>1.0.0</version>
76+
<version>1.1.0</version>
7577
</dependency>
7678
```
7779
### 2. Modify Code

Diff for: README_JP.md

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

4545
Gradleでプロジェクトを構築する場合、build.gradleファイルに次の構成を含めてください:
4646
```gradle
4747
dependencies {
48-
implementation 'cn.idev.excel:fastexcel:1.0.0'
48+
implementation 'cn.idev.excel:fastexcel:1.1.0'
4949
}
5050
```
51+
## 更新する
52+
具体的なバージョンアップ内容は[バージョンアップ詳細](update.md)で確認できます。 [Maven Central Repository](https://mvnrepository.com/artifact/cn.idev.excel/fastexcel) 内のすべてのバージョンをクエリすることもできます。
5153
## EasyExcelとFastExcelの違い
5254
- FastExcelはEasyExcelのすべての機能をサポートしていますが、FastExcelのパフォーマンスはより良く、より安定しています。
5355
- FastExcelとEasyExcelのAPIは完全に一致しているため、シームレスに切り替えることができます。
@@ -68,7 +70,7 @@ EasyExcelの依存関係をFastExcelの依存関係に置き換えます。以
6870
<dependency>
6971
<groupId>cn.idev.excel</groupId>
7072
<artifactId>fastexcel</artifactId>
71-
<version>1.0.0</version>
73+
<version>1.1.0</version>
7274
</dependency>
7375
```
7476
### 2. コードの修正

Diff for: easyexcel_en.md

-1
This file was deleted.

Diff for: fastexcel-core/pom.xml

+16-45
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
<name>fastexcel-core</name>
1717
<version>${revision}</version>
1818

19-
<properties>
20-
<itext.version>7.1.15</itext.version>
21-
</properties>
2219

2320
<dependencies>
2421
<dependency>
@@ -31,11 +28,27 @@
3128
<groupId>org.apache.poi</groupId>
3229
<artifactId>poi</artifactId>
3330
<version>5.2.5</version>
31+
<exclusions>
32+
<exclusion>
33+
<groupId>commons-io</groupId>
34+
<artifactId>commons-io</artifactId>
35+
</exclusion>
36+
<exclusion>
37+
<groupId>commons-codec</groupId>
38+
<artifactId>commons-codec</artifactId>
39+
</exclusion>
40+
</exclusions>
3441
</dependency>
3542
<dependency>
3643
<groupId>org.apache.poi</groupId>
3744
<artifactId>poi-ooxml</artifactId>
3845
<version>5.2.5</version>
46+
<exclusions>
47+
<exclusion>
48+
<groupId>commons-io</groupId>
49+
<artifactId>commons-io</artifactId>
50+
</exclusion>
51+
</exclusions>
3952
</dependency>
4053

4154
<dependency>
@@ -65,47 +78,5 @@
6578
<artifactId>fastexcel-support</artifactId>
6679
<version>0.0.1</version>
6780
</dependency>
68-
<!-- itext7 -->
69-
<dependency>
70-
<groupId>com.itextpdf</groupId>
71-
<artifactId>itext7-core</artifactId>
72-
<version>${itext.version}</version>
73-
<type>pom</type>
74-
</dependency>
75-
<dependency>
76-
<groupId>com.itextpdf</groupId>
77-
<artifactId>kernel</artifactId>
78-
<version>${itext.version}</version>
79-
</dependency>
80-
<dependency>
81-
<groupId>com.itextpdf</groupId>
82-
<artifactId>io</artifactId>
83-
<version>${itext.version}</version>
84-
</dependency>
85-
<dependency>
86-
<groupId>com.itextpdf</groupId>
87-
<artifactId>layout</artifactId>
88-
<version>${itext.version}</version>
89-
</dependency>
90-
<dependency>
91-
<groupId>com.itextpdf</groupId>
92-
<artifactId>forms</artifactId>
93-
<version>${itext.version}</version>
94-
</dependency>
95-
<dependency>
96-
<groupId>com.itextpdf</groupId>
97-
<artifactId>pdfa</artifactId>
98-
<version>${itext.version}</version>
99-
</dependency>
100-
<dependency>
101-
<groupId>com.itextpdf</groupId>
102-
<artifactId>pdftest</artifactId>
103-
<version>${itext.version}</version>
104-
</dependency>
105-
<dependency>
106-
<groupId>com.itextpdf</groupId>
107-
<artifactId>font-asian</artifactId>
108-
<version>${itext.version}</version>
109-
</dependency>
11081
</dependencies>
11182
</project>
-19
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
package cn.idev.excel;
22

3-
import cn.idev.excel.fileconvertor.ExcelConverter;
4-
import cn.idev.excel.fileconvertor.FileConverterContext;
5-
6-
import java.io.File;
7-
83
/**
94
* This is actually {@link FastExcelFactory}, and short names look better.
105
*
116
* @author jipengfei
127
*/
138
public class FastExcel extends FastExcelFactory {
149

15-
/**
16-
* Convert excel to pdf
17-
*
18-
* @param excelFile excel file
19-
* @param pdfFile pdf file
20-
* @param fontPath font path for pdf can be null
21-
* @param sheets sheet index to convert, if null convert all sheets
22-
*/
23-
public static void convertToPdf(File excelFile, File pdfFile, String fontPath, int[] sheets) {
24-
FileConverterContext context = new FileConverterContext(excelFile, pdfFile, fontPath, sheets);
25-
ExcelConverter excelConverter = context.getExcelConverter();
26-
excelConverter.convertToPdf();
27-
}
28-
2910
}

Diff for: fastexcel-core/src/main/java/cn/idev/excel/analysis/v07/handlers/sax/SharedStringsTableHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3333
*/
3434
public class SharedStringsTableHandler extends DefaultHandler {
3535

36-
private static final Pattern UTF_PATTTERN = Pattern.compile("_x([0-9A-Fa-f]{4})_");
36+
private static final Pattern UTF_PATTERN = Pattern.compile("_x([0-9A-Fa-f]{4})_");
3737

3838
/**
3939
* The final piece of data
@@ -154,7 +154,7 @@ static String utfDecode(String value) {
154154
}
155155

156156
StringBuilder buf = new StringBuilder();
157-
Matcher m = UTF_PATTTERN.matcher(value);
157+
Matcher m = UTF_PATTERN.matcher(value);
158158
int idx = 0;
159159
while (m.find()) {
160160
int pos = m.start();

0 commit comments

Comments
 (0)