Class ExcelConnectorConfiguration
- Namespace
- Datafication.Connectors.ExcelConnector
- Assembly
- Datafication.ExcelConnector.dll
Represents a configuration class for the Excel connector.
public class ExcelConnectorConfiguration : IDataConnectorConfiguration
- Inheritance
-
objectExcelConnectorConfiguration
- Implements
Remarks
This configuration provides options for reading data from Excel files similar to Pandas. Options include sheet selection (by name or index), header settings, row skipping, column filtering, and limiting the number of rows.
Constructors
ExcelConnectorConfiguration()
public ExcelConnectorConfiguration()
Properties
ErrorHandler
Gets or sets the error handler for managing exceptions.
public Action<Exception>? ErrorHandler { get; set; }
Property Value
- Action<Exception>
HasHeader
Gets or sets a value indicating whether the Excel data includes a header row.
public bool HasHeader { get; set; }
Property Value
- bool
Remarks
When set to true, the first row of the Excel sheet will be treated as column headers. When set to false, the data will be read starting from the first row.
HeaderRow
Gets or sets the header row offset. For example, a value of 0 means the first row after any skipped rows is the header. If a higher value is set, additional rows will be skipped before reading the header.
public int HeaderRow { get; set; }
Property Value
- int
Id
Gets or sets the unique identifier for this configuration.
public string Id { get; set; }
Property Value
- string
NRows
Gets or sets the maximum number of rows to read from the file. If null, all rows are read.
public int? NRows { get; set; }
Property Value
- int?
SheetIndex
Gets or sets the sheet index to be used. If both SheetName and SheetIndex are set, SheetName takes precedence.
public int? SheetIndex { get; set; }
Property Value
- int?
SheetName
Gets or sets the sheet name to be used. If not provided, the first sheet will be used.
public string? SheetName { get; set; }
Property Value
- string
SkipRows
Gets or sets the number of rows to skip before reading any data.
public int SkipRows { get; set; }
Property Value
- int
Source
Gets or sets the source URI for the Excel data.
public Uri Source { get; set; }
Property Value
- Uri
Remarks
This represents the location of the Excel data source. It can be a file path (file://), a URL (http://, https://), or a relative path that will be resolved against the application's base directory.
UseColumns
Gets or sets the columns to use. Specify a comma‐separated list of column names (or indexes) to include. If null, all columns are loaded.
public string? UseColumns { get; set; }
Property Value
- string