LoadFromCollection(T) Method (IEnumerable(T), Boolean, TableStyles)

Office Open XML

Load a collection of T into the worksheet starting from the top left row of the range. Default option will load all public instance properties of T

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
)
Visual Basic (Declaration)
Public Function LoadFromCollection(Of T) ( _
	Collection As IEnumerable(Of T), _
	PrintHeaders As Boolean, _
	TableStyle As TableStyles _
) As ExcelRangeBase
Visual C++
public:
generic<typename T>
ExcelRangeBase^ LoadFromCollection(
	IEnumerable<T>^ Collection, 
	bool PrintHeaders, 
	TableStyles TableStyle
)

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
TableStyle
Type: OfficeOpenXml.Table..::.TableStyles
Will create a table with this style. If set to TableStyles.None no table will be created

Type Parameters

T
The datatype in the collection

Return Value

The filled range

See Also