Skip to content
This repository was archived by the owner on Mar 9, 2020. It is now read-only.
Open
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
5 changes: 3 additions & 2 deletions EPPlus/ExcelRangeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2013,8 +2013,9 @@ public ExcelRangeBase LoadFromCollection<T>(IEnumerable<T> Collection, bool Prin
/// <param name="TableStyle">Will create a table with this style. If set to TableStyles.None no table will be created</param>
/// <param name="memberFlags">Property flags to use</param>
/// <param name="Members">The properties to output. Must be of type T</param>
/// <param name="Formatter">A delegate that formats the names of the headers</param>
/// <returns>The filled range</returns>
public ExcelRangeBase LoadFromCollection<T>(IEnumerable<T> Collection, bool PrintHeaders, TableStyles TableStyle, BindingFlags memberFlags, MemberInfo[] Members)
public ExcelRangeBase LoadFromCollection<T>(IEnumerable<T> Collection, bool PrintHeaders, TableStyles TableStyle, BindingFlags memberFlags, MemberInfo[] Members, Func<string, string> Formatter = null)
{
var type = typeof(T);
bool isSameType = true;
Expand Down Expand Up @@ -2067,7 +2068,7 @@ public ExcelRangeBase LoadFromCollection<T>(IEnumerable<T> Collection, bool Prin
}
else
{
header = t.Name.Replace('_', ' ');
header = (Formatter != null) ? Formatter(t.Name) : t.Name;
}
}
//_worksheet.SetValueInner(row, col++, header);
Expand Down