Skip to content

Commit

Permalink
修正空白行
Browse files Browse the repository at this point in the history
  • Loading branch information
luxuia committed Apr 10, 2023
1 parent ed9b40f commit 3d51503
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExcelMerge/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,13 @@ List<string> GetHeaderStrList(WorkBookWrap wrap, ISheet sheet) {
var list = new List<IRow>();
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;
Expand Down

0 comments on commit 3d51503

Please sign in to comment.