Skip to content

Commit

Permalink
check null
Browse files Browse the repository at this point in the history
  • Loading branch information
luxuia committed Mar 4, 2024
1 parent 7d35d5d commit 5fcb33a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExcelMerge/Entrance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public static void OnDragFile(string[] files, bool isSrc)
{
if (isSrc)
{
SrcFile = files[1];
DstFile = files[1];
}
else
{
DstFile = files[1];
SrcFile = files[1];
}
}

Expand Down
4 changes: 4 additions & 0 deletions ExcelMerge/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,10 @@ List<string> GetHeaderStrList(WorkBookWrap wrap, ISheet sheet) {
list.Add(row);
}

if (list.Count == 0)
{
return null;
}
for (int i = startcol; i < list[0].Cells.Count; ++i) {
var str = "";
for (int j = 0; j < list.Count; ++j) {
Expand Down

0 comments on commit 5fcb33a

Please sign in to comment.