LoadFromCollection(T) Method (IEnumerable(T), Boolean, TableStyles, BindingFlags, MemberInfo[])

Office Open XML

Load a collection into the worksheet starting from the top left row of the range.

Namespace:  OfficeOpenXml
Assembly:  EPPlus (in EPPlus.dll) Version: 3.0.0.1 (3.0.0.1)

Syntax

C#
public ExcelRangeBase LoadFromCollection<T>(
	IEnumerable<T> Collection,
	bool PrintHeaders,
	TableStyles TableStyle,
	BindingFlags memberFlags,
	MemberInfo[] Members
)
Visual Basic (Declaration)
Public Function LoadFromCollection(Of T) ( _
	Collection As IEnumerable(Of T), _
	PrintHeaders As Boolean, _
	TableStyle As TableStyles, _
	memberFlags As BindingFlags, _
	Members As MemberInfo() _
) As ExcelRangeBase
Visual C++
public:
generic<typename T>
ExcelRangeBase^ LoadFromCollection(
	IEnumerable<T>^ Collection, 
	bool PrintHeaders, 
	TableStyles TableStyle, 
	BindingFlags memberFlags, 
	array<MemberInfo^>^ Members
)

Parameters

Collection
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)
The collection to load
PrintHeaders
Type: System..::.Boolean
Print the property names on the first row. Any underscore in the property name will be converted to a space.
TableStyle
Type: OfficeOpenXml.Table..::.TableStyles
Will create a table with this style. If set to TableStyles.None no table will be created
memberFlags
Type: System.Reflection..::.BindingFlags
Property flags to use
Members
Type: array< System.Reflection..::.MemberInfo >[]()[]
The properties to output. Must be of type T

Type Parameters

T
The datatype in the collection

Return Value

The filled range

See Also