CreateDataTableOptions Class
Represents options creating System.Data.DataTable and filling it with values from ExcelWorksheet.
public sealed class CreateDataTableOptions
Public NotInheritable Class CreateDataTableOptions
- Inheritance:
- System.ObjectCreateDataTableOptions
Remarks
Use default constructor to extract used cell range.
Constructors
CreateDataTableOptions()
Initializes an instance of CreateDataTableOptions class.
Remarks
Use this constructor to extract used cell range.
CreateDataTableOptions(Int32, Int32, Int32, Int32)
Initializes an instance of CreateDataTableOptions class.
public CreateDataTableOptions(int startRow, int startColumn, int numberOfRows, int numberOfColumns)
Public Sub New(startRow As Integer, startColumn As Integer, numberOfRows As Integer, numberOfColumns As Integer)
Parameters
startRow
- System.Int32
Index of the first row of data being extracted from ExcelWorksheet.
startColumn
- System.Int32
Index of the first column of data being extracted from ExcelWorksheet.
numberOfRows
- System.Int32
Number of rows being extracted from ExcelWorksheet.
numberOfColumns
- System.Int32
Number of columns being extracted from ExcelWorksheet.
CreateDataTableOptions(String, Int32, Int32)
Initializes an instance of CreateDataTableOptions class.
public CreateDataTableOptions(string startCell, int numberOfRows, int numberOfColumns)
Public Sub New(startCell As String, numberOfRows As Integer, numberOfColumns As Integer)
Parameters
startCell
- System.String
Name of the first (top left) cell of data being extracted from ExcelWorksheet.
numberOfRows
- System.Int32
Number of rows being extracted from ExcelWorksheet.
numberOfColumns
- System.Int32
Number of columns being extracted from ExcelWorksheet.
Properties
ColumnHeaders
Gets or sets a value indicating whether to use first row of extracted data for column headers.
Property Value
- System.Boolean
ColumnHeadersComparer
Gets or sets the comparison operation that's used for resolving names of column headers.
public StringComparer ColumnHeadersComparer { get; set; }
Public Property ColumnHeadersComparer As StringComparer
Property Value
- System.StringComparer
Remarks
Default value is System.StringComparer.Ordinal.
ColumnIndexes
Gets a list of indexes of columns which will be extracted.
public IList<int> ColumnIndexes { get; }
Public ReadOnly Property ColumnIndexes As IList(Of Integer)
Property Value
- System.Collections.Generic.IList<System.Int32>
Remarks
StartColumn and NumberOfColumns are ignored if ColumnIndexes has any values.
ExtractDataOptions
Gets or sets ExtractDataOptions.
public ExtractDataOptions ExtractDataOptions { get; set; }
Public Property ExtractDataOptions As ExtractDataOptions
Property Value
Remarks
Default value is None.
NumberOfColumns
Gets or sets the number of columns being extracted from ExcelWorksheet.
Property Value
- System.Int32
Remarks
NumberOfColumns is ignored if ColumnIndexes has any values.
NumberOfRows
Gets or sets the number of rows being extracted from ExcelWorksheet.
Property Value
- System.Int32
Resolution
Gets or sets the resolution type that specifies how column types will be resolved in created System.Data.DataTable, see ColumnTypeResolution.
public ColumnTypeResolution Resolution { get; set; }
Public Property Resolution As ColumnTypeResolution
Property Value
Remarks
Default value is Auto.
StartColumn
Gets or sets the index of the first column of data being extracted from ExcelWorksheet.
Property Value
- System.Int32
Remarks
StartColumn is ignored if ColumnIndexes has any values.
StartRow
Gets or sets the index of the first row of data being extracted from ExcelWorksheet.
Property Value
- System.Int32