Skip to content

Commit

Permalink
#2115 remove empty rows
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaperez1983 committed Jan 8, 2025
1 parent eac9da9 commit ca0b8b2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions src/OSPSuite.Infrastructure.Import/Core/DataSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,6 @@ public void RemoveEmptyColumns()
}
}

public void RemoveEmptyRowsAtTheEnd()
{
for (var i = _rawDataTable.Count - 1; i >= 0; i--)
{
if (_rawDataTable[i].All(x => x.IsNullOrEmpty()))
_rawDataTable.RemoveAt(i);
else
break;
}
}

public void RemoveEmptyRows()
{
for (var i = _rawDataTable.Count - 1; i >= 0; i--)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected override void LoadFromFile(string path)
}

dataSheet.RemoveEmptyColumns();
dataSheet.RemoveEmptyRowsAtTheEnd();
dataSheet.RemoveEmptyRows();

DataSheets.AddSheet(dataSheet);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override void LoadFromFile(string path)
}

rawSheetData.RemoveEmptyColumns();
rawSheetData.RemoveEmptyRowsAtTheEnd();
rawSheetData.RemoveEmptyRows();

DataSheets.AddSheet(rawSheetData);
}
Expand Down

0 comments on commit ca0b8b2

Please sign in to comment.