Example:
```
using (ExcelPackage pck = new ExcelPackage())
{
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("EmptyCollectionBug");
List<string> aList = new List<string>();
aList.Add("Test");
ws.Cells["K8"].LoadFromCollection<string>(aList.Where(i => i != "Test"));
}
```
My fix:
ExcelRangeBase.cs, line 2016, Add:
```
if (Collection.Count() < 1)
return null;
```
Likely a better way to do this, but it gets the job done. Obviously code can check for 0 count collections rather than lib, but it saved me writing a lot more code.
```
using (ExcelPackage pck = new ExcelPackage())
{
ExcelWorksheet ws = pck.Workbook.Worksheets.Add("EmptyCollectionBug");
List<string> aList = new List<string>();
aList.Add("Test");
ws.Cells["K8"].LoadFromCollection<string>(aList.Where(i => i != "Test"));
}
```
My fix:
ExcelRangeBase.cs, line 2016, Add:
```
if (Collection.Count() < 1)
return null;
```
Likely a better way to do this, but it gets the job done. Obviously code can check for 0 count collections rather than lib, but it saved me writing a lot more code.