Excel.ExcelReader<TModel> Class
Namespace: Nucleus.Extensions.Excel
Assembly: Nucleus.Extensions.dll
Class used to read Excel files into an IEnumerable of the class specified by TModel.
Type Parameters
TModel |
Type being imported. |
Constructors
Nucleus.Extensions.Excel.ExcelReader<TModel>
Constructor
Nucleus.Extensions.Excel.ExcelReader<TModel> (System.IO.Stream)
Use this constructor if you want to set up columns manually using the
AddColumn method.
Nucleus.Extensions.Excel.ExcelReader<TModel>
Constructor
Nucleus.Extensions.Excel.ExcelReader<TModel> (Stream input, Modes mode, String[] properties)
Use this constructor to automatically set up columns.
Methods
AddColumn<TModel>
(Expression<TModel>) Method
AddColumn<TModel> (Expression<TModel> expression)
Add a column using an expression to specify the column.
Parameters
Name |
Type |
expression
|
System.Linq.Expressions.Expression<TModel>
|
AddColumn<TModel>
(String,String,XLDataType,Action<TModel>) Method
AddColumn<TModel> (String name, String caption, XLDataType dataType, Action<TModel> expression)
Add a column with an expression which is called to set the input value.
Parameters
Name |
Type |
name
|
String
|
caption
|
String
|
dataType
|
ClosedXML.Excel.XLDataType
|
expression
|
Action<TModel>
|
Import
Import ()
Automatically read items from the current worksheet.