Skip to content

Commit 5e24582

Browse files
committed
2 parents 11aa75e + b0850ad commit 5e24582

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,4 @@ __pycache__/
262262

263263
/BenchmarkDotNet.Artifacts
264264
/tests/MiniExcel.Tests.AspNetMvc/packages
265+
/TestTemplate

docs/README.zh-CN.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@
2323
<p> 您的 <a href="https://github.com/shps951023/miniexcel">Star</a> 和 <a href="https://miniexcel.github.io">赞助</a> 能帮助 MiniExcel 成长 </p>
2424
</div>
2525

26-
---
27-
28-
<div align="center">
29-
<p> 您的 <a href="https://github.com/shps951023/miniexcel">Star</a> 和 <a href="https://miniexcel.github.io">赞助</a> 能帮助 MiniExcel 成长 </p>
30-
</div>
31-
32-
3326
---
3427

3528
### 1.26.2

src/MiniExcel/OpenXml/ExcelOpenXmlTemplate.Impl.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ private void WriteSheetXml(Stream stream, XmlDocument doc, XmlNode sheetData)
267267
{
268268
cellValueStr = ConvertToDateTimeString(propInfo, cellValue);
269269
}
270+
else if (TypeHelper.IsNumericType(type))
271+
{
272+
if (decimal.TryParse(cellValueStr, out var decimalValue))
273+
cellValueStr = decimalValue.ToString(System.Globalization.CultureInfo.InvariantCulture);
274+
}
270275

271276
//TODO: ![image](https://user-images.githubusercontent.com/12729184/114848248-17735880-9e11-11eb-8258-63266bda0a1a.png)
272277
newRow.InnerXml = newRow.InnerXml.Replace(key, cellValueStr);
@@ -614,6 +619,7 @@ private void UpdateDimensionAndGetRowsInfo(Dictionary<string, object> inputMaps,
614619
else if (decimal.TryParse(cellValueStr, out var outV))
615620
{
616621
c.SetAttribute("t", "n");
622+
cellValueStr = outV.ToString(System.Globalization.CultureInfo.InvariantCulture);
617623
}
618624
else if (cellValue is bool)
619625
{

0 commit comments

Comments
 (0)