From 3d5150367a416ab72b94d1bb9e61473c2f553c23 Mon Sep 17 00:00:00 2001 From: luxuia Date: Mon, 10 Apr 2023 23:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=A9=BA=E7=99=BD=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExcelMerge/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExcelMerge/MainWindow.xaml.cs b/ExcelMerge/MainWindow.xaml.cs index 286f735..7b5d32f 100644 --- a/ExcelMerge/MainWindow.xaml.cs +++ b/ExcelMerge/MainWindow.xaml.cs @@ -619,13 +619,13 @@ List GetHeaderStrList(WorkBookWrap wrap, ISheet sheet) { var list = new List(); for (int i = startrow; i < DiffStartIdx(startrow); ++i) { var row = sheet.GetRow(i); - if (row == null) return null; + if (row == null) continue; list.Add(row); } for (int i = startcol; i < list[0].Cells.Count; ++i) { var str = ""; - for (int j = 0; j < DiffStartIdx(0); ++j) { + 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;