ExtractToDataTableOptions Class
Represents options for extracting data from ExcelWorksheet to System.Data.DataTable.
public sealed class ExtractToDataTableOptionsPublic NotInheritable Class ExtractToDataTableOptions- Inheritance:
- System.ObjectExtractToDataTableOptions
Constructors
ExtractToDataTableOptions(Int32, Int32, Int32)
Initializes an instance of ExtractToDataTableOptions class.
public ExtractToDataTableOptions(int startRow, int startColumn, int numberOfRows)Public Sub New(startRow As Integer, startColumn As Integer, numberOfRows 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.
ExtractToDataTableOptions(String, Int32)
Initializes an instance of ExtractToDataTableOptions class.
public ExtractToDataTableOptions(string startCell, int numberOfRows)Public Sub New(startCell As String, numberOfRows 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.
Properties
ExtractDataOptions
Gets or sets ExtractDataOptions.
public ExtractDataOptions ExtractDataOptions { get; set; }Public Property ExtractDataOptions As ExtractDataOptionsProperty Value
Remarks
Default value is None.
MappingCollection
Gets the collection used for mapping ExcelWorksheet columns to System.Data.DataTable columns.
public DataColumnMappingCollection MappingCollection { get; }Public ReadOnly Property MappingCollection As DataColumnMappingCollectionProperty Value
- System.Data.Common.DataColumnMappingCollection
Remarks
StartColumn is ignored if MappingCollection has any values.
NumberOfRows
Gets or sets the number of rows being extracted from ExcelWorksheet.
Property Value
- System.Int32
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 MappingCollection has any values.
StartRow
Gets or sets the index of the first row of data being extracted from ExcelWorksheet.
Property Value
- System.Int32
Events
ExcelCellToDataTableCellConverting
Event that fires when converting ExcelCell value to System.Data.DataTable cell value.
public event EventHandler<ExcelCellToDataTableCellConvertingEventArgs> ExcelCellToDataTableCellConvertingPublic Event ExcelCellToDataTableCellConverting As EventHandler(Of ExcelCellToDataTableCellConvertingEventArgs)Event Type
- System.EventHandler<ExcelCellToDataTableCellConvertingEventArgs>