Skip to content

Commit

Permalink
修正头行有空的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
luxuia committed Jun 15, 2024
1 parent 5fcb33a commit 31d06fe
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ExcelMerge/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ int[] getColumn2Diff(List<DiffResult<string>> diff, bool from) {
return ret;
}

// 对比两个sheet
SheetDiffStatus DiffSheet(ISheet src, ISheet dst, SheetDiffStatus status = null) {
status = status??new SheetDiffStatus() { sortKey = config.DefaultKeyID };

Expand Down Expand Up @@ -313,6 +314,9 @@ public void Refresh() {
dstSheetID = sheetidx;
}
}
} else
{
// 新增sheet,直接完整显示
}
}

Expand Down Expand Up @@ -504,12 +508,13 @@ List<string> GetHeaderStrList(WorkBookWrap wrap, ISheet sheet) {
var str = "";
for (int j = 0; j < list.Count; ++j) {
var cell_s = Util.GetCellValue(list[j].GetCell(i));
if (j == 0 && string.IsNullOrWhiteSpace(cell_s)) {
return header;
}

str = str + (j > 0 ? ":" + cell_s : cell_s);
}

if (string.IsNullOrWhiteSpace(str))
{
return header;
}
header.Add(str);
}
} else {
Expand Down

0 comments on commit 31d06fe

Please sign in to comment.