Class DataColumnMappingCollection
- Namespace
- OfficeOpenXml.Export.ToDataTable
- Assembly
- EPPlus.dll
A collection of DataColumnMappings that will be used when reading data from the source range.
public class DataColumnMappingCollection : List<DataColumnMapping>, IList<DataColumnMapping>, ICollection<DataColumnMapping>, IList, ICollection, IReadOnlyList<DataColumnMapping>, IReadOnlyCollection<DataColumnMapping>, IEnumerable<DataColumnMapping>, IEnumerable
- Inheritance
-
DataColumnMappingCollection
- Implements
- Inherited Members
Constructors
DataColumnMappingCollection()
public DataColumnMappingCollection()
Methods
Add(int, DataColumn)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, DataColumn dataColumn)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
dataColumn
DataColumnThe destination DataColumn in the DataTable
Add(int, DataColumn, Func<object, object>)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, DataColumn dataColumn, Func<object, object> transformCellValueFunc)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
dataColumn
DataColumnThe destination DataColumn in the DataTable
transformCellValueFunc
Func<object, object>A function that casts/transforms the value before it is written to the DataTable
- See Also
Add(int, string)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
columnName
stringName of the DataColumn in the DataTable
Add(int, string, bool)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, bool allowNull)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
columnName
stringName of the DataColumn in the DataTable
allowNull
boolIndicates if values read from the source range can be null
Add(int, string, Func<object, object>)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, Func<object, object> transformCellValueFunc)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
columnName
stringName of the DataColumn in the DataTable
transformCellValueFunc
Func<object, object>A function that casts/transforms the value before it is written to the DataTable
Add(int, string, Type)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
columnName
stringName of the DataColumn in the DataTable
columnDataType
TypeType of the DataColumn
Add(int, string, Type, bool)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType, bool allowNull)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
columnName
stringName of the DataColumn in the DataTable
columnDataType
TypeType of the DataColumn
allowNull
boolIndicates if values read from the source range can be null
Add(int, string, Type, bool, Func<object, object>)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType, bool allowNull, Func<object, object> transformCellValueFunc)
Parameters
zeroBasedIndexInRange
intZero based index of the column in the source range
columnName
stringName of the DataColumn in the DataTable
columnDataType
TypeType of the DataColumn
allowNull
boolIndicates if values read from the source range can be null
transformCellValueFunc
Func<object, object>A function that casts/transforms the value before it is written to the DataTable
- See Also