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