private void AddData(AssemblyInfo report, ISheet worksheet) { var data = new List<List<string>>(); foreach (var typeInfo in report.Types) { foreach (var change in typeInfo.Changes) { var row = new List<string>(); data.Add(row); ForEachColumn((i, f) => row.Add(f.Getter(report, typeInfo, change, null, null))); } foreach (var memberInfo in typeInfo.Members) { foreach (var change in memberInfo.Changes) { var row = new List<string>(); data.Add(row); ForEachColumn((i, f) => row.Add(f.Getter(report, typeInfo, null, memberInfo, change))); } } } data = data.OrderByDescending(row => row[0]).ToList(); if (_multipleSheets) { _rowIndex = 1; } foreach (var dataRow in data) { var row = worksheet.CreateRow(_rowIndex); for (var i = 0; i < dataRow.Count; i++) { row.CreateCell(i).SetCellValue(dataRow[i]); } _rowIndex++; } }