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
ExcelReader<TModel>
(Stream) Constructor
ExcelReader<TModel> (Stream input)
Use this constructor if you want to set up columns manually using the
AddColumn method.
ExcelReader<TModel>
(Stream, Modes, String[]) Constructor
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.