方法
This commit is contained in:
parent
7e1bbaab31
commit
7773907d95
@ -85,6 +85,19 @@ namespace YD_AllHeartRates.Api.Utilities
|
||||
|
||||
for (int row = 2; row <= worksheet.Dimension.End.Row; row++)
|
||||
{
|
||||
// 跳过空行
|
||||
bool isEmptyRow = true;
|
||||
for (int col = 1; col <= worksheet.Dimension.End.Column; col++)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(worksheet.Cells[row, col].Text))
|
||||
{
|
||||
isEmptyRow = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isEmptyRow)
|
||||
continue;
|
||||
|
||||
var dataObject = new T();
|
||||
|
||||
for (int col = 1; col <= worksheet.Dimension.End.Column; col++)
|
||||
@ -142,6 +155,7 @@ namespace YD_AllHeartRates.Api.Utilities
|
||||
result.Add(dataObject);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d519db60065b57bb45c944c9712771e34f5a400e")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7e1bbaab315f2ae7502343f72735413eb2ac9405")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
02e16b3352abc716b497740142c2e3ae17e1f814994e7b90b67f7b1f49efdd7d
|
||||
24d6911f3a4f57a1e85f43b3126d306b828d7978fb41f33c0e9f8a99145f7176
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user