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(Int32, DataColumn)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, DataColumn dataColumn)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| DataColumn | dataColumn | The destination System.Data.DataColumn in the System.Data.DataTable |
Add(Int32, DataColumn, Func<Object, Object>)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, DataColumn dataColumn, Func<object, object> transformCellValueFunc)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| DataColumn | dataColumn | The destination System.Data.DataColumn in the System.Data.DataTable |
| Func<Object, Object> | transformCellValueFunc | A function that casts/transforms the value before it is written to the System.Data.DataTable |
See Also
Add(Int32, String)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, string columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| String | columnName | Name of the System.Data.DataColumn in the System.Data.DataTable |
Add(Int32, String, Boolean)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, string columnName, bool allowNull)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| String | columnName | Name of the System.Data.DataColumn in the System.Data.DataTable |
| Boolean | allowNull | Indicates if values read from the source range can be null |
Add(Int32, String, Func<Object, Object>)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, string columnName, Func<object, object> transformCellValueFunc)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| String | columnName | Name of the System.Data.DataColumn in the System.Data.DataTable |
| Func<Object, Object> | transformCellValueFunc | A function that casts/transforms the value before it is written to the System.Data.DataTable |
Add(Int32, String, Type)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| String | columnName | Name of the System.Data.DataColumn in the System.Data.DataTable |
| Type | columnDataType | System.Type of the System.Data.DataColumn |
Add(Int32, String, Type, Boolean)
Adds a DataColumnMapping
Declaration
public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType, bool allowNull)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| String | columnName | Name of the System.Data.DataColumn in the System.Data.DataTable |
| Type | columnDataType | System.Type of the System.Data.DataColumn |
| Boolean | allowNull | Indicates if values read from the source range can be null |
Add(Int32, String, Type, Boolean, 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 |
|---|---|---|
| Int32 | zeroBasedIndexInRange | Zero based index of the column in the source range |
| String | columnName | Name of the System.Data.DataColumn in the System.Data.DataTable |
| Type | columnDataType | System.Type of the System.Data.DataColumn |
| Boolean | 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 System.Data.DataTable |