This commit is contained in:
tanglong 2025-07-11 15:07:46 +08:00
parent 7e1bbaab31
commit 7773907d95
8 changed files with 16 additions and 2 deletions

View File

@ -85,6 +85,19 @@ namespace YD_AllHeartRates.Api.Utilities
for (int row = 2; row <= worksheet.Dimension.End.Row; row++) 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(); var dataObject = new T();
for (int col = 1; col <= worksheet.Dimension.End.Column; col++) for (int col = 1; col <= worksheet.Dimension.End.Column; col++)
@ -142,6 +155,7 @@ namespace YD_AllHeartRates.Api.Utilities
result.Add(dataObject); result.Add(dataObject);
} }
return result; return result;
} }

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [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.AssemblyProductAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
02e16b3352abc716b497740142c2e3ae17e1f814994e7b90b67f7b1f49efdd7d 24d6911f3a4f57a1e85f43b3126d306b828d7978fb41f33c0e9f8a99145f7176