Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>2.7.4.4</Version>
<Version>2.7.4.100</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<NoWarn>1591</NoWarn>
Expand Down
11 changes: 10 additions & 1 deletion src/Magicodes.ExporterAndImporter.Excel/Utility/ImportHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ protected virtual void ParseData(ExcelPackage excelPackage)
}

var value = col.MappingValues[cellValue];

if (isEnum && isNullable && (value is int || value is short)
// && Enum.IsDefined(type, value)
)
Expand Down Expand Up @@ -1156,6 +1156,15 @@ protected virtual void ParseData(ExcelPackage excelPackage)
continue;
}

#region 删除千分位符 ","
var types = new string[] { "Int64", "Nullable<Int64>", "Int32", "Nullable<Int32>", "Int16", "Nullable<Int16>", "Decimal", "Nullable<Decimal>", "Double", "Nullable<Double>" };
var csType = propertyInfo.PropertyType.GetCSharpTypeName();
if (types.Contains(csType))
{
cellValue = cellValue?.Replace(",", "");
}
#endregion

switch (propertyInfo.PropertyType.GetCSharpTypeName())
{
case "Boolean":
Expand Down