Skip to content

Commit

Permalink
doc : add chinese readme desc
Browse files Browse the repository at this point in the history
  • Loading branch information
shps951023 committed Feb 21, 2023
1 parent b8f08a6 commit 6358ce4
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 5 deletions.
71 changes: 69 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,30 @@ MiniExcel.SaveAs(path, value);



#### 12. 垂直合并相同的单元格

只支持 `xlsx` 格式合并单元格

```csharp
var mergedFilePath = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid().ToString()}.xlsx");

var path = @"../../../../../samples/xlsx/TestMergeSameCells.xlsx";

MiniExcel.MergeSameCells(mergedFilePath, path);
```

```csharp
var memoryStream = new MemoryStream();

var path = @"../../../../../samples/xlsx/TestMergeSameCells.xlsx";

memoryStream.MergeSameCells(path);
```

合并前后对比

![before_merge_cells](https://user-images.githubusercontent.com/38832863/219970175-913b3d04-d714-4279-a7a4-6cefb7aa6ce8.PNG)
![after_merge_cells](https://user-images.githubusercontent.com/38832863/219970176-e78c491a-2f90-45a7-a4a2-425c5708d38c.PNG)



Expand Down Expand Up @@ -752,9 +775,53 @@ var value = new
MiniExcel.SaveAsByTemplate(path, templatePath, value);
```

#### 7. 分组数据填充

```csharp
var value = new Dictionary<string, object>()
{
["employees"] = new[] {
new {name="Jack",department="HR"},
new {name="Jack",department="HR"},
new {name="John",department="HR"},
new {name="John",department="IT"},
new {name="Neo",department="IT"},
new {name="Loan",department="IT"}
}
};
MiniExcel.SaveAsByTemplate(path, templatePath, value);
```
##### 1. 使用`@group` tag 和 @header` tag

Before

![before_with_header](https://user-images.githubusercontent.com/38832863/218646717-21b9d57a-2be2-4e9a-801b-ae212231d2b4.PNG)

After

![after_with_header](https://user-images.githubusercontent.com/38832863/218646721-58a7a340-7004-4bc2-af24-cffcb2c20737.PNG)

##### 2. 使用 @group tag 没有 @header tag

Before

![before_without_header](https://user-images.githubusercontent.com/38832863/218646873-b12417fa-801b-4890-8e96-669ed3b43902.PNG)

After

![after_without_header](https://user-images.githubusercontent.com/38832863/218646872-622461ba-342e-49ee-834f-b91ad9c2dac3.PNG)

##### 3. 没有 @group tag

Before

![without_group](https://user-images.githubusercontent.com/38832863/218646975-f52a68eb-e031-43b5-abaa-03b67c052d1a.PNG)

After

![without_group_after](https://user-images.githubusercontent.com/38832863/218646974-4a3c0e07-7c66-4088-ad07-b4ad3695b7e1.PNG)

#### 7. DataTable 当参数
#### 8. DataTable 当参数

```csharp
var managers = new DataTable();
Expand All @@ -772,7 +839,7 @@ var value = new Dictionary<string, object>()
MiniExcel.SaveAsByTemplate(path, templatePath, value);
```

#### 8. 其他
#### 9. 其他

##### 1. 检查模版参数

Expand Down
71 changes: 69 additions & 2 deletions README.zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,30 @@ MiniExcel.SaveAs(path, value);

![image](https://user-images.githubusercontent.com/12729184/153702334-c3b834f4-6ae4-4ddf-bd4e-e5005d5d8c6a.png)

#### 12. 垂直合併相同的單元格

只支持 `xlsx` 格式合併單元格

```csharp
var mergedFilePath = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid().ToString()}.xlsx");

var path = @"../../../../../samples/xlsx/TestMergeSameCells.xlsx";

MiniExcel.MergeSameCells(mergedFilePath, path);
```

```csharp
var memoryStream = new MemoryStream();

var path = @"../../../../../samples/xlsx/TestMergeSameCells.xlsx";

memoryStream.MergeSameCells(path);
```

合併前後對比

![before_merge_cells](https://user-images.githubusercontent.com/38832863/219970175-913b3d04-d714-4279-a7a4-6cefb7aa6ce8.PNG)
![after_merge_cells](https://user-images.githubusercontent.com/38832863/219970176-e78c491a-2f90-45a7-a4a2-425c5708d38c.PNG)



Expand Down Expand Up @@ -748,9 +771,53 @@ var value = new
MiniExcel.SaveAsByTemplate(path, templatePath, value);
```

#### 7. 分組數據填充

```csharp
var value = new Dictionary<string, object>()
{
["employees"] = new[] {
new {name="Jack",department="HR"},
new {name="Jack",department="HR"},
new {name="John",department="HR"},
new {name="John",department="IT"},
new {name="Neo",department="IT"},
new {name="Loan",department="IT"}
}
};
MiniExcel.SaveAsByTemplate(path, templatePath, value);
```
##### 1. 使用`@group` tag 和 @header` tag

Before

![before_with_header](https://user-images.githubusercontent.com/38832863/218646717-21b9d57a-2be2-4e9a-801b-ae212231d2b4.PNG)

After

![after_with_header](https://user-images.githubusercontent.com/38832863/218646721-58a7a340-7004-4bc2-af24-cffcb2c20737.PNG)

##### 2. 使用 @group tag 沒有 @header tag

Before

![before_without_header](https://user-images.githubusercontent.com/38832863/218646873-b12417fa-801b-4890-8e96-669ed3b43902.PNG)

After

![after_without_header](https://user-images.githubusercontent.com/38832863/218646872-622461ba-342e-49ee-834f-b91ad9c2dac3.PNG)

##### 3. 沒有 @group tag

Before

![without_group](https://user-images.githubusercontent.com/38832863/218646975-f52a68eb-e031-43b5-abaa-03b67c052d1a.PNG)

After

![without_group_after](https://user-images.githubusercontent.com/38832863/218646974-4a3c0e07-7c66-4088-ad07-b4ad3695b7e1.PNG)

#### 7. DataTable 當參數
#### 8. DataTable 當參數

```csharp
var managers = new DataTable();
Expand All @@ -768,7 +835,7 @@ var value = new Dictionary<string, object>()
MiniExcel.SaveAsByTemplate(path, templatePath, value);
```

#### 8. 其他
#### 9. 其他

##### 1. 檢查模版參數

Expand Down
4 changes: 4 additions & 0 deletions docs/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

---

### 1.30.2
- [New] 支持 grouped rows (via @eynarhaji)
- [New] 支持 automatic merge vertical cells (via @eynarhaji)

### 1.30.1
- [New] 支持 function 自定义 separator (via @hyzx86)
- [New] 支持 config for get sheet names (via @H4ad)
Expand Down
6 changes: 5 additions & 1 deletion docs/README.zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@

---

### 1.30.1

### 1.30.2
- [New] 支持 grouped rows (via @eynarhaji)
- [New] 支持 automatic merge vertical cells (via @eynarhaji)

### 1.30.1
- [New] 支持 function 自定義 separator (via @hyzx86)
- [New] 支持 config for get sheet names (via @H4ad)

Expand Down

0 comments on commit 6358ce4

Please sign in to comment.