Class DataColumnMapping
Inheritance
DataColumnMapping
Assembly: EPPlus.dll
Syntax
public class DataColumnMapping
Properties
AllowNull
Indicates whether empty cell values should be allowed. Corresponds to AllowDBNull
Declaration
public bool AllowNull { get; set; }
Property Value
ColumnDataType
Declaration
public Type ColumnDataType { get; set; }
Property Value
DataColumn
Declaration
public DataColumn DataColumn { get; }
Property Value
DataColumnName
Name of the data column, corresponds to ColumnName
Declaration
public string DataColumnName { get; set; }
Property Value
A function which allows casting of an object before it is written to the DataTable
Declaration
public Func<object, object> TransformCellValue { get; set; }
Property Value
var options = ToDataTableOptions.Create(o =>
{
// the last argument is a lambda function that will call the read value's ToString method
// and this string will be written to the DataTable
o.Mappings.Add(0, "Id", typeof(string), true, c => "Id: " + c.ToString());
});
ZeroBasedColumnIndexInRange
Zero based index of the mappings column in the range
Declaration
public int ZeroBasedColumnIndexInRange { get; set; }
Property Value