Skip to content

Commit eaa632f

Browse files
committed
feat:add snapshot for hard_write action
1 parent 13a2455 commit eaa632f

28 files changed

+182
-31
lines changed

pages/en-US/docs/write/write_hard.mdx

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ The complex writing feature supports various Excel data export requirements by s
1111
### Overview
1212
Dynamically select columns to export by setting a collection of column names, supporting ignoring columns or exporting only specific columns.
1313

14+
### excel 示例
15+
![img](/images/docs/write_hard/excludeOrIncludeWrite.jpg)
16+
1417
#### Code Example
1518
```java
1619
@Test
@@ -40,6 +43,9 @@ public void excludeOrIncludeWrite() {
4043
### Overview
4144
Specify the column order using the `@ExcelProperty` annotation's `index` attribute.
4245

46+
### excel 示例
47+
![img](/images/docs/write_hard/indexWrite.jpg)
48+
4349
#### Sample Object
4450
```java
4551
@Getter
@@ -72,6 +78,9 @@ public void indexWrite() {
7278
### Overview
7379
Supports setting multi-level headers by specifying main titles and sub-titles using the `@ExcelProperty` annotation.
7480

81+
### excel 示例
82+
![img](/images/docs/write_hard/complexHeadWrite.jpg)
83+
7584
#### Sample Object
7685
```java
7786
@Getter
@@ -105,6 +114,9 @@ public void complexHeadWrite() {
105114
### Overview
106115
Write data to the same sheet or multiple sheets in batches to achieve pagination writing for large amounts of data.
107116

117+
### excel 示例
118+
![img](/images/docs/write_hard/repeatedWrite.jpg)
119+
108120
#### Code Example
109121
```java
110122
@Test
@@ -136,6 +148,9 @@ public void repeatedWrite() {
136148
### Overview
137149
Supports date, number, or other custom formats through annotations.
138150

151+
### excel 示例
152+
![img](/images/docs/write_hard/converterWrite.jpg)
153+
139154
#### Sample Object
140155
```java
141156
@Getter
@@ -175,6 +190,9 @@ public void converterWrite() {
175190
#### Overview
176191
Set cell styles in the entity class using annotations, including font, background color, row height, etc.
177192

193+
### excel 示例
194+
![img](/images/docs/write_hard/annotationStyleWrite.jpg)
195+
178196
#### Sample Object
179197
```java
180198
@Getter
@@ -224,6 +242,9 @@ public void annotationStyleWrite() {
224242
#### Overview
225243
Dynamically set styles by implementing the `WriteHandler` interceptor interface, suitable for complex style logic.
226244

245+
### excel 示例
246+
![img](/images/docs/write_hard/handlerStyleWrite.jpg)
247+
227248
#### Example 1: Using Existing Strategy
228249
Set styles for headers and content separately using `HorizontalCellStyleStrategy`.
229250

@@ -356,6 +377,9 @@ public void poiStyleWrite() {
356377
### Overview
357378
Supports exporting images using files, streams, byte arrays, URLs, and other methods.
358379

380+
### excel 示例
381+
![img](/images/docs/write_hard/imageWrite.jpg)
382+
359383
#### Sample Object
360384
```java
361385
@Getter
@@ -400,6 +424,9 @@ public void imageWrite() throws Exception {
400424
### Overview
401425
Supports cell hyperlinks, adding comments, and setting formula content.
402426

427+
### excel 示例
428+
![img](/images/docs/write_hard/writeCellDataWrite.jpg)
429+
403430
#### Sample Object
404431
```java
405432
@Getter
@@ -441,6 +468,9 @@ public void writeCellDataWrite() {
441468
### Overview
442469
Generate table headers dynamically for dynamic data or internationalization scenarios.
443470

471+
### excel 示例
472+
![img](/images/docs/write_hard/dynamicHeadWrite.jpg)
473+
444474
#### Code Example
445475
```java
446476
@Test
@@ -465,6 +495,9 @@ public void dynamicHeadWrite() {
465495
### Overview
466496
Add comments to specific cells using interceptors, suitable for marking explanations or special tips.
467497

498+
### excel 示例
499+
![img](/images/docs/write_hard/commentWrite.jpg)
500+
468501
### Custom Comment Interceptor
469502
```java
470503
@Slf4j
@@ -506,6 +539,9 @@ public void commentWrite() {
506539
### Overview
507540
Supports filling data on an existing template file, suitable for standardized output.
508541

542+
### excel 示例
543+
![img](/images/docs/write_hard/commentWrite.jpg)
544+
509545
### Sample Code
510546
```java
511547
@Test
@@ -527,6 +563,9 @@ public void templateWrite() {
527563
### Overview
528564
Control column width and row height through annotations, suitable for scenarios with specific table format requirements.
529565

566+
### excel 示例
567+
![img](/images/docs/write_hard/widthAndHeightWrite.jpg)
568+
530569
### Sample Object
531570
```java
532571
@Getter
@@ -567,6 +606,9 @@ public void widthAndHeightWrite() {
567606
### Overview
568607
Supports merging cells using annotations or custom merge strategies.
569608

609+
### excel 示例
610+
![img](/images/docs/write_hard/mergeWrite.jpg)
611+
570612
### Method 1: Annotation Form
571613
```java
572614
@Getter
@@ -622,6 +664,9 @@ public void mergeWrite() {
622664
### Overview
623665
Supports writing multiple tables in one sheet.
624666

667+
### excel 示例
668+
![img](/images/docs/write_hard/tableWrite.jpg)
669+
625670
### Sample Code
626671
```java
627672
@Test
@@ -646,6 +691,9 @@ public void tableWrite() {
646691
### Overview
647692
Generate dynamic table headers for scenarios where the header content changes dynamically.
648693

694+
### excel 示例
695+
![img](/images/docs/write_hard/dynamicHeadWrite.jpg)
696+
649697
### Sample Code
650698
```java
651699
@Test
@@ -671,6 +719,9 @@ public void dynamicHeadWrite() {
671719
### Overview
672720
Custom logic implementation (such as adding dropdowns, setting hyperlinks) requires operation through interceptors.
673721

722+
### excel 示例
723+
![img](/images/docs/write_hard/customHandlerWrite.jpg)
724+
674725
### Example 1: Setting Dropdowns
675726
```java
676727
public class DropdownWriteHandler implements SheetWriteHandler {
@@ -688,4 +739,12 @@ public class DropdownWriteHandler implements SheetWriteHandler {
688739
### Sample Code
689740
```java
690741
@Test
691-
public void
742+
public void customHandlerWrite() {
743+
String fileName = "customHandlerWrite" + System.currentTimeMillis() + ".xlsx";
744+
745+
FastExcel.write(fileName, DemoData.class)
746+
.registerWriteHandler(new DropdownWriteHandler())
747+
.sheet("Custom Interceptors")
748+
.doWrite(data());
749+
}
750+
```

pages/zh-CN/docs/advance_api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FastExcel 提供了一套简单易用的 API 来处理 Excel 文件,支持读
88

99

1010
# 核心概念
11-
如果你需要对 excel 进行大量或者详细的读写操作,你需要知道一些 fastexcel中比较重要的概念和类。它们在你尝试自定义操作时,能够提供丰富的选项。
11+
如果你需要对 excel 进行大量或者详细的读写操作,你需要知道一些类,FastExcel 中比较重要的概念和类。它们在你尝试自定义操作时,能够提供丰富的选项。
1212
- `FastExcel`:入口类,用于构建开始各种操作
1313
- `ExcelReaderBuilder`:ExcelWriterBuilder 构建出一个 ReadWorkbook WriteWorkbook,可以理解成一个excel对象,一个excel只要构建一个
1414
- `ExcelReaderSheetBuilder`:ExcelWriterSheetBuilder 构建出一个 ReadSheet WriteSheet对象,可以理解成excel里面的一页,每一页都要构建一个
@@ -761,7 +761,7 @@ public class DemoDataListener extends AnalysisEventListener<DemoData> {
761761

762762
## **2. `ReadListener`**
763763

764-
`ReadListener` 是 FastExcel 2.x 版本提供的接口,它提供了类似的功能,但它是对 `AnalysisEventListener` 的抽象和扩展,简化了处理,并且更符合现代的编程方式。
764+
`ReadListener` 是 FastExcel 提供的核心接口之一,它提供了类似 `AnalysisEventListener`的功能,但对 `AnalysisEventListener` 进行了抽象和扩展,简化了处理,并且更符合现代的编程方式。
765765

766766
### **主要特点:**
767767
- **易于使用**`ReadListener` 更为简化,通常用来进行按行数据处理。

pages/zh-CN/docs/contribution.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: 贡献指南
33
description: 贡献指南
44
---
55

6-
# fastexcel 做贡献
6+
# FastExcel 做贡献
77

8-
fastexcel 欢迎社区的每一位用户和开发者成为贡献者。无论是报告问题、改进文档、提交代码,还是提供技术支持,您的参与都将帮助 fastexcel 变得更好。
8+
FastExcel 欢迎社区的每一位用户和开发者成为贡献者。无论是报告问题、改进文档、提交代码,还是提供技术支持,您的参与都将帮助 FastExcel 变得更好。
99

1010
---
1111

1212
## 报告问题
1313

14-
我们鼓励用户在使用 fastexcel 的过程中随时提供反馈。您可以通过 [NEW ISSUE](https://github.com/CodePhiliaX/fastexcel/issues/new/choose) 提交问题。
14+
我们鼓励用户在使用 FastExcel 的过程中随时提供反馈。您可以通过 [NEW ISSUE](https://github.com/CodePhiliaX/fastexcel/issues/new/choose) 提交问题。
1515

1616
### 高质量问题报告
1717

@@ -35,7 +35,7 @@ fastexcel 欢迎社区的每一位用户和开发者成为贡献者。无论是
3535

3636
## 贡献代码与文档
3737

38-
所有对 fastexcel 的改进均可通过 Pull Request (PR) 实现。无论是修复 Bug、优化代码、增强功能,还是改进文档,都非常欢迎!
38+
所有对 FastExcel 的改进均可通过 Pull Request (PR) 实现。无论是修复 Bug、优化代码、增强功能,还是改进文档,都非常欢迎!
3939

4040
### 您可以贡献的方向
4141
- 修复错别字
@@ -60,7 +60,7 @@ fastexcel 欢迎社区的每一位用户和开发者成为贡献者。无论是
6060
### 工作区准备
6161

6262
确保您已注册 GitHub 账号,并按照以下步骤完成本地开发环境配置:
63-
1. **Fork 仓库**:在 fastexcel[GitHub 页面](https://github.com/CodePhiliaX/fastexcel) 点击 `Fork` 按钮,将项目复制到您的 GitHub 账户下,例如:`https://github.com/<your-username>/fastexcel`
63+
1. **Fork 仓库**:在 FastExcel[GitHub 页面](https://github.com/CodePhiliaX/fastexcel) 点击 `Fork` 按钮,将项目复制到您的 GitHub 账户下,例如:`https://github.com/<your-username>/fastexcel`
6464
2. **克隆代码库**:运行以下命令将 Fork 的项目克隆到本地:
6565
```bash
6666
git clone [email protected]:<your-username>/fastexcel.git
@@ -76,7 +76,7 @@ fastexcel 欢迎社区的每一位用户和开发者成为贡献者。无论是
7676

7777
### 分支定义
7878

79-
fastexcel 中,所有贡献应基于 `main` 开发分支。此外,还有以下分支类型:
79+
FastExcel 中,所有贡献应基于 `main` 开发分支。此外,还有以下分支类型:
8080
- **release 分支**:用于版本发布(如 `0.6.0`, `0.6.1`)。
8181
- **feature 分支**:用于开发较大的功能。
8282
- **hotfix 分支**:用于修复重要 Bug。
@@ -128,11 +128,11 @@ git config --get user.email
128128

129129
## 其他参与方式
130130

131-
除了直接贡献代码,以下方式同样是对 fastexcel 的宝贵支持:
131+
除了直接贡献代码,以下方式同样是对 FastExcel 的宝贵支持:
132132
- 回答其他用户的问题。
133133
- 帮助审阅他人的 PR。
134134
- 提出改进建议。
135-
- 撰写技术博客,宣传 fastexcel
135+
- 撰写技术博客,宣传 FastExcel
136136
- 在社区中分享项目相关知识。
137137

138138
---
@@ -146,4 +146,4 @@ git config --get user.email
146146

147147
---
148148

149-
**最后,感谢您对 fastexcel 的支持!每一份帮助,都是我们前进的动力。**
149+
**最后,感谢您对 FastExcel 的支持!每一份帮助,都是我们前进的动力。**

pages/zh-CN/docs/converter_file/converter_to_pdf.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ description: FastExcel Excel转换为PDF
66
## Excel转换为PDF
77

88
### 概述
9-
FastExcel 支持将 Excel 文件转换为 PDF 文件。FastExcel将Excel转为Pdf 底层依赖于Apache POI和 itext-pdf。受限于itext-pdf的许可证,请确保您的使用符合itext-pdf的许可证。
10-
后续FastExcel将支持更多的PDF转换功能。替换itext-pdf。
9+
FastExcel 支持将 Excel 文件转换为 PDF 文件。FastExcel 将Excel转为Pdf 底层依赖于Apache POI和 itext-pdf。受限于itext-pdf的许可证,请确保您的使用符合itext-pdf的许可证。
10+
后续 FastExcel 将支持更多的PDF转换功能。替换itext-pdf。
1111

1212
#### 示例对象
1313
```java

pages/zh-CN/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: fastexcel介绍
2+
title: FastExcel 介绍
33
description: FastExcel 是由原 EasyExcel 作者创建的最新作品
44
---
55

pages/zh-CN/docs/intro/_meta.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export default {
2-
quick_start: "安装于配置",
2+
quick_start: "安装与配置",
33
one_demo: "一个简单的例子",
44
};

pages/zh-CN/docs/intro/quick_start.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ description: 快速开始使用 FastExcel 安装与配置
55

66
## 安装
77

8-
下表列出了各版本 fastexcel 基础库对 Java 语言版本最低要求的情况:
8+
下表列出了各版本 FastExcel 基础库对 Java 语言版本最低要求的情况:
99

1010
| 版本 | jdk版本支持范围 | 备注 |
1111
|--------|:---------------:|----------------------------------|
1212
| 1.0.0+ | jdk8 - jdk21 | 目前的master分支,完全兼容easyexcel |
1313

14-
我们强烈建议您使用最新版本的 fastexcel,因为最新版本中的性能优化、BUG修复和新功能都会让您的使用更加方便。
14+
我们强烈建议您使用最新版本的 FastExcel,因为最新版本中的性能优化、BUG修复和新功能都会让您的使用更加方便。
1515

16-
> 因为 fastexcel 底层使用 poi 作为基础包,如果您使用 4+ 以上的版本,并且项目中已经有 poi 相关组件,需要您手动排除 poi 的相关 jar 包。
16+
> 当前 FastExcel 底层使用 poi 作为基础包,如果您的项目中已经有 poi 相关组件,需要您手动排除 poi 的相关 jar 包。
1717
1818
### Maven
1919
如果您使用 Maven 进行项目构建,请在 `pom.xml` 文件中引入以下配置:
@@ -31,15 +31,15 @@ dependencies {
3131
implementation 'cn.idev.excel:fastexcel:1.0.0'
3232
}
3333
```
34-
## easyexcelfastexcel 的区别
35-
_ 1. fastexcel 支持所有 easyexcel 的功能,但是 fastexcel 的性能更好,更稳定。
36-
_ 2. fastexceleasyexcel 的 API 完全一致,可以无缝切换。
37-
_ 3. fastexcel 会持续的更新,修复 bug,优化性能,增加新功能。
34+
## EasyExcelFastExcel 的区别
35+
_ 1. FastExcel 支持所有 EasyExcel 的功能,但是 FastExcel 的性能更好,更稳定。
36+
_ 2. FastExcelEasyExcel 的 API 完全一致,可以无缝切换。
37+
_ 3. FastExcel 会持续的更新,修复 bug,优化性能,增加新功能。
3838

39-
## easyexcel 如何升级到 fastexcel
39+
## EasyExcel 如何升级到 FastExcel
4040

4141
### 1. 修改依赖
42-
easyexcel 的依赖替换为 fastexcel 的依赖,如下:
42+
EasyExcel 的依赖替换为 FastExcel 的依赖,如下:
4343
```xml
4444
<!-- easyexcel 依赖 -->
4545
<dependency>
@@ -58,21 +58,21 @@ _ 3. fastexcel 会持续的更新,修复 bug,优化性能,增加新功能
5858
```
5959

6060
### 2. 修改代码
61-
easyexcel 的包名替换为 fastexcel 的包名,如下:
61+
EasyExcel 的包名替换为 FastExcel 的包名,如下:
6262
```java
63-
// 将 easyexcel 的包名替换为 fastexcel 的包名
63+
// 将 easyexcel 的包名替换为 FastExcel 的包名
6464
import com.alibaba.excel.**;
6565
```
6666
替换为
6767
```java
6868
import cn.idev.excel.**;
6969
```
70-
### 3. 不修改代码直接依赖 fastexcel
71-
如果由于种种原因您不想修改代码,可以直接依赖 fastexcel,然后在 `pom.xml` 文件中直接依赖 fastexcel
72-
easyexcelfastexcel 可以共存,但是长期建议替换为 fastexcel
70+
### 3. 不修改代码直接依赖 FastExcel
71+
如果由于种种原因您不想修改代码,可以直接依赖 FastExcel ,然后在 `pom.xml` 文件中直接依赖 FastExcel
72+
EasyExcelFastExcel 可以共存,但是长期建议替换为 FastExcel
7373

7474
### 4. 建议以后使用 FastExcel 类
75-
为了兼容性考虑保留了 EasyExcel 类,但是建议以后使用 FastExcel 类,FastExcel 类是 fastexcel 的入口类,功能包含了 EasyExcel 类的所有功能,以后新特性仅在 FastExcel 类中添加。
75+
为了兼容性考虑保留了 EasyExcel 类,但是建议以后使用 FastExcel 类,FastExcel 类是 类,FastExcel 的入口类,功能包含了 EasyExcel 类的所有功能,以后新特性仅在 FastExcel 类中添加。
7676

7777

7878

0 commit comments

Comments
 (0)