Table of Contents

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)

public void Add(int zeroBasedIndexInRange, DataColumn dataColumn)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

dataColumn DataColumn

The destination DataColumn in the DataTable

Add(int, DataColumn, Func<object, object>)

public void Add(int zeroBasedIndexInRange, DataColumn dataColumn, Func<object, object> transformCellValueFunc)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

dataColumn DataColumn

The 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)

public void Add(int zeroBasedIndexInRange, string columnName)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

columnName string

Name of the DataColumn in the DataTable

Add(int, string, bool)

public void Add(int zeroBasedIndexInRange, string columnName, bool allowNull)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

columnName string

Name of the DataColumn in the DataTable

allowNull bool

Indicates if values read from the source range can be null

Add(int, string, Func<object, object>)

public void Add(int zeroBasedIndexInRange, string columnName, Func<object, object> transformCellValueFunc)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

columnName string

Name 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)

public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

columnName string

Name of the DataColumn in the DataTable

columnDataType Type

Type of the DataColumn

Add(int, string, Type, bool)

public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType, bool allowNull)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

columnName string

Name of the DataColumn in the DataTable

columnDataType Type

Type of the DataColumn

allowNull bool

Indicates if values read from the source range can be null

Add(int, string, Type, bool, Func<object, object>)

public void Add(int zeroBasedIndexInRange, string columnName, Type columnDataType, bool allowNull, Func<object, object> transformCellValueFunc)

Parameters

zeroBasedIndexInRange int

Zero based index of the column in the source range

columnName string

Name of the DataColumn in the DataTable

columnDataType Type

Type of the DataColumn

allowNull bool

Indicates 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