diff --git a/src/Luban.Job.Cfg/Source/DataSources/Excel/RowColumnSheet.cs b/src/Luban.Job.Cfg/Source/DataSources/Excel/RowColumnSheet.cs index 3564398..a4d63d0 100644 --- a/src/Luban.Job.Cfg/Source/DataSources/Excel/RowColumnSheet.cs +++ b/src/Luban.Job.Cfg/Source/DataSources/Excel/RowColumnSheet.cs @@ -42,7 +42,7 @@ namespace Luban.Job.Cfg.DataSources.Excel { foreach (var row in cells) { - if (IsBlankRow(row, title.FromIndex, title.ToIndex)) + if (IsBlankRow(row, title)) { continue; } @@ -188,6 +188,15 @@ namespace Luban.Job.Cfg.DataSources.Excel return Rows; } + public static bool IsBlankRow(List row, Title title) + { + if (title.SubTitleList.Count == 0) + { + return IsBlankRow(row, title.FromIndex, title.ToIndex); + } + return title.SubTitleList.All(t => IsBlankRow(row, t)); + } + public static bool IsBlankRow(List row, int fromIndex, int toIndex) { for (int i = Math.Max(1, fromIndex), n = Math.Min(toIndex, row.Count - 1); i <= n; i++)