Skip to content

Commit 7e692bc

Browse files
virzakshps951023
andauthored
Replace image chart with mermaid (#829)
* Replace image chart with mermaid * Remove drawio * Change style * Update README.zh-CN.md 🙌🙌🙌 Because in China Gitee platform not support mermaid yet, and lots miniexcel users in China use this platform : https://gitee.com/dotnetchina/MiniExcel Signed-off-by: Wei Lin <[email protected]> --------- Signed-off-by: Wei Lin <[email protected]> Co-authored-by: Wei Lin <[email protected]>
1 parent e80c3c2 commit 7e692bc

File tree

3 files changed

+57
-173
lines changed

3 files changed

+57
-173
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,22 @@ MiniExcel is a simple and efficient Excel processing tool for .NET, specifically
3737

3838
At present, most popular frameworks need to load all the data from an Excel document into memory to facilitate operations, but this may cause memory consumption problems. MiniExcel's approach is different: the data is processed row by row in a streaming manner, reducing the original consumption from potentially hundreds of megabytes to just a few megabytes, effectively preventing out-of-memory(OOM) issues.
3939

40-
![Screenshot 2025-06-22 123525](https://github.com/user-attachments/assets/0b99a61e-8061-4604-8957-0b1f3ec74544)
40+
```mermaid
41+
flowchart LR
42+
A1(["Excel analysis<br>process"]) --> A2{{"Unzipping<br>XLSX file"}} --> A3{{"Parsing<br>OpenXML"}} --> A4{{"Model<br>conversion"}} --> A5(["Output"])
4143
44+
B1(["Other Excel<br>Frameworks"]) --> B2{{"Memory"}} --> B3{{"Memory"}} --> B4{{"Workbooks &<br>Worksheets"}} --> B5(["All rows at<br>the same time"])
45+
46+
C1(["MiniExcel"]) --> C2{{"Stream"}} --> C3{{"Stream"}} --> C4{{"POCO or dynamic"}} --> C5(["Deferred execution<br>row by row"])
47+
48+
classDef analysis fill:#D0E8FF,stroke:#1E88E5,color:#0D47A1,font-weight:bold;
49+
classDef others fill:#FCE4EC,stroke:#EC407A,color:#880E4F,font-weight:bold;
50+
classDef miniexcel fill:#E8F5E9,stroke:#388E3C,color:#1B5E20,font-weight:bold;
51+
52+
class A1,A2,A3,A4,A5 analysis;
53+
class B1,B2,B3,B4,B5 others;
54+
class C1,C2,C3,C4,C5 miniexcel;
55+
```
4256

4357
### Features
4458

@@ -1534,7 +1548,7 @@ public class ApiController : Controller
15341548
<input type='file' name='excel'> <br>
15351549
<input type='submit' >
15361550
</form>
1537-
</body></html>"
1551+
</body></html{{"
15381552
};
15391553
}
15401554

README.zh-Hant.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,22 @@ MiniExcel 簡單、高效避免OOM的.NET處理Excel查、寫、填充工具。
4141

4242
目前主流框架大多需要將資料全載入到記憶體方便操作,但這會導致記憶體消耗問題,MiniExcel 嘗試以 Stream 角度寫底層算法邏輯,能讓原本1000多MB占用降低到幾MB,避免記憶體不夠情況。
4343

44-
![image](https://user-images.githubusercontent.com/12729184/113084691-1804d000-9211-11eb-9b08-cbb89d9ecdc2.png)
44+
```mermaid
45+
flowchart LR
46+
A1(["Excel 解析流程"]) --> A2{{"XLSX文件<br>解壓縮"}} --> A3{{"解析<br>OpenXML"}} --> A4{{"模型轉"}} --> A5(["返回結果"])
47+
48+
B1(["一般框架"]) --> B2{{"記憶體"}} --> B3{{"記憶體"}} --> B4{{"封裝類別"}} --> B5(["全部資料"])
49+
50+
C1(["MiniExcel"]) --> C2{{"Stream流"}} --> C3{{"Stream流"}} --> C4{{"POCO<br>或 dynamic"}} --> C5(["延遲查詢<br>一行一行返回"])
51+
52+
classDef analysis fill:#D0E8FF,stroke:#1E88E5,color:#0D47A1,font-weight:bold;
53+
classDef others fill:#FCE4EC,stroke:#EC407A,color:#880E4F,font-weight:bold;
54+
classDef miniexcel fill:#E8F5E9,stroke:#388E3C,color:#1B5E20,font-weight:bold;
55+
56+
class A1,A2,A3,A4,A5 analysis;
57+
class B1,B2,B3,B4,B5 others;
58+
class C1,C2,C3,C4,C5 miniexcel;
59+
```
4560

4661
### 特點
4762
- 低記憶體耗用,避免OOM、頻繁 Full GC 情況
@@ -100,29 +115,29 @@ Benchmark History : [Link](https://github.com/mini-software/MiniExcel/issues/27
100115
邏輯 : 以 [**Test1,000,000x10.xlsx**](benchmarks/MiniExcel.Benchmarks/Test1%2C000%2C000x10.xlsx) 做基準與主流框架做性能測試,總共 1,000,000 行 * 10 列筆 "HelloWorld",文件大小 23 MB
101116

102117

103-
| Library | Method | 最大記憶體耗用 | 平均時間 |
104-
| ---------------------------- | -------------: | ---------------: | ---------------: |
105-
| MiniExcel | 'MiniExcel QueryFirst' | 0.109 MB | 0.0007264 sec |
106-
| ExcelDataReader | 'ExcelDataReader QueryFirst' | 15.24 MB | 10.66421 sec |
107-
| MiniExcel | 'MiniExcel Query' | 17.3 MB | 14.17933 sec |
108-
| ExcelDataReader | 'ExcelDataReader Query' | 17.3 MB | 22.56508 sec |
109-
| Epplus | 'Epplus QueryFirst' | 1,452 MB | 18.19801 sec |
110-
| Epplus | 'Epplus Query' | 1,451 MB | 23.64747 sec |
111-
| OpenXmlSDK | 'OpenXmlSDK Query' | 1,412 MB | 52.00327 sec |
112-
| OpenXmlSDK | 'OpenXmlSDK QueryFirst' | 1,413 MB | 52.34865 sec |
113-
| ClosedXml | 'ClosedXml QueryFirst' | 2,158 MB | 66.18897 sec |
114-
| ClosedXml | 'ClosedXml Query' | 2,184 MB | 191.43412 sec |
118+
| Library | Method | 最大記憶體耗用 | 平均時間 |
119+
| --------------- | ---------------------------: | -------------: | ------------: |
120+
| MiniExcel | 'MiniExcel QueryFirst' | 0.109 MB | 0.0007264 sec |
121+
| ExcelDataReader | 'ExcelDataReader QueryFirst' | 15.24 MB | 10.66421 sec |
122+
| MiniExcel | 'MiniExcel Query' | 17.3 MB | 14.17933 sec |
123+
| ExcelDataReader | 'ExcelDataReader Query' | 17.3 MB | 22.56508 sec |
124+
| Epplus | 'Epplus QueryFirst' | 1,452 MB | 18.19801 sec |
125+
| Epplus | 'Epplus Query' | 1,451 MB | 23.64747 sec |
126+
| OpenXmlSDK | 'OpenXmlSDK Query' | 1,412 MB | 52.00327 sec |
127+
| OpenXmlSDK | 'OpenXmlSDK QueryFirst' | 1,413 MB | 52.34865 sec |
128+
| ClosedXml | 'ClosedXml QueryFirst' | 2,158 MB | 66.18897 sec |
129+
| ClosedXml | 'ClosedXml Query' | 2,184 MB | 191.43412 sec |
115130

116131
#### 導出、創建 Excel 比較
117132

118133
邏輯 : 創建1千萬筆 "HelloWorld"
119134

120-
| Library | Method | 最大記憶體耗用 | 平均時間 |
121-
| ------------------------ | -------------: | ---------------: | -----------: |
122-
| MiniExcel | 'MiniExcel Create Xlsx' | 15 MB | 11.53181 sec |
123-
| Epplus | 'Epplus Create Xlsx' | 1,204 MB | 22.50971 sec |
124-
| OpenXmlSdk | 'OpenXmlSdk Create Xlsx' | 2,621 MB | 42.47399 sec |
125-
| ClosedXml | 'ClosedXml Create Xlsx' | 7,141 MB | 140.93992 sec |
135+
| Library | Method | 最大記憶體耗用 | 平均時間 |
136+
| ---------- | -----------------------: | -------------: | ------------: |
137+
| MiniExcel | 'MiniExcel Create Xlsx' | 15 MB | 11.53181 sec |
138+
| Epplus | 'Epplus Create Xlsx' | 1,204 MB | 22.50971 sec |
139+
| OpenXmlSdk | 'OpenXmlSdk Create Xlsx' | 2,621 MB | 42.47399 sec |
140+
| ClosedXml | 'ClosedXml Create Xlsx' | 7,141 MB | 140.93992 sec |
126141

127142

128143

@@ -162,9 +177,9 @@ using (var stream = File.OpenRead(path))
162177

163178
* Key 系統預設為 `A,B,C,D...Z`
164179

165-
| MiniExcel | 1 |
166-
| -------- | -------- |
167-
| Github | 2 |
180+
| MiniExcel | 1 |
181+
| --------- | --- |
182+
| Github | 2 |
168183

169184
```csharp
170185

@@ -188,10 +203,10 @@ using (var stream = File.OpenRead(path))
188203

189204
Input Excel :
190205

191-
| Column1 | Column2 |
192-
| -------- | -------- |
193-
| MiniExcel | 1 |
194-
| Github | 2 |
206+
| Column1 | Column2 |
207+
| --------- | ------- |
208+
| MiniExcel | 1 |
209+
| Github | 2 |
195210

196211

197212
```csharp

0 commit comments

Comments
 (0)