Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/EPPlus/Core/CellStore/RangeDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ internal bool Exists(int row, int col)
}
internal List<T> GetValuesFromRange(int fromRow, int fromCol, int toRow, int toCol)
{
if (_addresses.Keys.Count == 0) return new List<T>();
var hs = new HashSet<T>();
long rowSpan = ((fromRow - 1) << 20) | (fromRow - 1);
var searchItem = new RangeItem(rowSpan, default);
Expand Down
9 changes: 8 additions & 1 deletion src/EPPlusTest/DataValidation/DataValidationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1295,5 +1295,12 @@ public void DataValidationsPerformance()
SaveAndCleanup(p);
}
}
}
[TestMethod]
public void VerifyClearDataValidationOnEmptyRange()
{
using var p = new ExcelPackage();
var ws = p.Workbook.Worksheets.Add("Sheet1");
ws.Cells[1, 1, 4, 4].DataValidation.ClearDataValidation();
}
}
}
Loading