Class TextConnection
Represents a text file connection for importing data.
Inherited Members
Namespace: DRIT.Spreadsheet.Data
Assembly: DRIT.Spreadsheet.dll
Syntax
public class TextConnection : DataConnection
Constructors
TextConnection()
Initializes a new instance of the TextConnection class.
Declaration
public TextConnection()
TextConnection(string)
Initializes a new instance of the TextConnection class with a source file.
Declaration
public TextConnection(string sourceFile)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceFile | The path to the source text file. |
Properties
CodePage
Specifies the code page for character encoding.
Declaration
public int CodePage { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Comma
Gets or sets whether to use comma as delimiter.
Declaration
public bool Comma { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Consecutive
Gets or sets whether to use consecutive delimiters.
Declaration
public bool Consecutive { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Decimal
Specifies the decimal separator.
Declaration
public string Decimal { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Delimiter
Specifies the delimiter string.
Declaration
public string Delimiter { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Fields
Specifies the list of fields in the text connection.
Declaration
public List<TextConnectionField> Fields { get; set; }
Property Value
| Type | Description |
|---|---|
| List<TextConnectionField> |
FileType
Specifies the file type for the text connection.
Declaration
public TextFileType FileType { get; set; }
Property Value
| Type | Description |
|---|---|
| TextFileType |
FirstRow
Specifies the first row to import.
Declaration
public int FirstRow { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
IsDelimited
Gets or sets whether the file is delimited.
Declaration
public bool IsDelimited { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Prompt
Gets or sets whether to prompt the user.
Declaration
public bool Prompt { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Qualifier
Specifies the qualifier for text values.
Declaration
public Qualifier Qualifier { get; set; }
Property Value
| Type | Description |
|---|---|
| Qualifier |
SemiColon
Gets or sets whether to use semicolon as delimiter.
Declaration
public bool SemiColon { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Space
Gets or sets whether to use space as delimiter.
Declaration
public bool Space { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Tab
Gets or sets whether to use tab as delimiter.
Declaration
public bool Tab { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Thousands
Specifies the thousands separator.
Declaration
public string Thousands { get; set; }
Property Value
| Type | Description |
|---|---|
| string |