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
zeroBasedIndexInRangeintZero based index of the column in the source range
dataColumnDataColumnThe 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
zeroBasedIndexInRangeintZero based index of the column in the source range
dataColumnDataColumnThe destination DataColumn in the DataTable
transformCellValueFuncFunc<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
zeroBasedIndexInRangeintZero based index of the column in the source range
columnNamestringName of the DataColumn in the DataTable
Add(int, string, bool)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, bool allowNull)
Parameters
zeroBasedIndexInRangeintZero based index of the column in the source range
columnNamestringName of the DataColumn in the DataTable
allowNullboolIndicates 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
zeroBasedIndexInRangeintZero based index of the column in the source range
columnNamestringName of the DataColumn in the DataTable
transformCellValueFuncFunc<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
zeroBasedIndexInRangeintZero based index of the column in the source range
columnNamestringName of the DataColumn in the DataTable
columnDataTypeTypeType of the DataColumn
Add(int, string, Type, bool)
Adds a DataColumnMapping
public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType, bool allowNull)
Parameters
zeroBasedIndexInRangeintZero based index of the column in the source range
columnNamestringName of the DataColumn in the DataTable
columnDataTypeTypeType of the DataColumn
allowNullboolIndicates 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
zeroBasedIndexInRangeintZero based index of the column in the source range
columnNamestringName of the DataColumn in the DataTable
columnDataTypeTypeType of the DataColumn
allowNullboolIndicates if values read from the source range can be null
transformCellValueFuncFunc<object, object>A function that casts/transforms the value before it is written to the DataTable
- See Also