diff --git a/RhSolutions.AddIn/Services/ExcelWriter.cs b/RhSolutions.AddIn/Services/ExcelWriter.cs index 4ac4f2b..ab04c50 100644 --- a/RhSolutions.AddIn/Services/ExcelWriter.cs +++ b/RhSolutions.AddIn/Services/ExcelWriter.cs @@ -182,7 +182,7 @@ public class ExcelWriter : IWriter, IDisposable previous.Copy(current); current.ClearContents(); - worksheetCells[row, groupColumn].Value2 = positionAmount.Key.ProductLines.First(); + worksheetCells[row, groupColumn].Value2 = positionAmount.Key.ProductLines.FirstOrDefault() ?? string.Empty; worksheetCells[row, nameColumn].Value2 = positionAmount.Key.Name; if (_oldSkuCell != null)