ExportToDataGridViewOptions Class
Represents options for exporting data from ExcelWorksheet to System.Windows.Forms.DataGridView.
public sealed class ExportToDataGridViewOptions
Public NotInheritable Class ExportToDataGridViewOptions
- Inheritance:
- System.ObjectExportToDataGridViewOptions
Remarks
Use default constructor to export used cell range.
Constructors
ExportToDataGridViewOptions()
Initializes an instance of ExportToDataGridViewOptions class.
Remarks
Use this constructor to export used cell range.
ExportToDataGridViewOptions(Int32, Int32, Int32, Int32)
Initializes an instance of ExportToDataGridViewOptions class.
public ExportToDataGridViewOptions(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 exported from ExcelWorksheet.
startColumn
- System.Int32
Index of the first column of data being exported from ExcelWorksheet.
numberOfRows
- System.Int32
Number of rows being exported from ExcelWorksheet.
numberOfColumns
- System.Int32
Number of columns being exported from ExcelWorksheet.
ExportToDataGridViewOptions(String, Int32, Int32)
Initializes an instance of ExportToDataGridViewOptions class.
public ExportToDataGridViewOptions(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 exported from ExcelWorksheet.
numberOfRows
- System.Int32
Number of rows being exported from ExcelWorksheet.
numberOfColumns
- System.Int32
Number of columns being exported from ExcelWorksheet.
Properties
ColumnHeaders
Gets or sets a value indicating whether to use first row of exported data for column headers.
Property Value
- System.Boolean
HeaderCellPredicate
Gets or sets a predicate that determines if the given ExcelCell is part of the header. This is useful when you don't know in which row a header has been placed.
public Predicate<ExcelCell> HeaderCellPredicate { get; set; }
Public Property HeaderCellPredicate As Predicate(Of ExcelCell)
Property Value
- System.Predicate<ExcelCell>
HeaderRowSearchingDirection
Gets or sets the direction in which the header row will be searched. Default value is TopToBottom
public SearchingDirection HeaderRowSearchingDirection { get; set; }
Public Property HeaderRowSearchingDirection As SearchingDirection
Property Value
NumberOfColumns
Gets or sets the number of columns being exported from ExcelWorksheet.
Property Value
- System.Int32
NumberOfRows
Gets or sets the number of rows being exported from ExcelWorksheet.
Property Value
- System.Int32
StartColumn
Gets or sets the index of the first column of data being exported from ExcelWorksheet.
Property Value
- System.Int32
StartRow
Gets or sets the index of the first row of data being exported from ExcelWorksheet.
Property Value
- System.Int32