Modifica

Condividi tramite


TextConnection Interface

Definition

Contains Service Contract settings that enable Excel to connect to a Data Feed data source.

public interface class TextConnection
[System.Runtime.InteropServices.Guid("000244D3-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface TextConnection
Public Interface TextConnection
Attributes

Properties

Application

Returns an Application Application object that represents the Excel application. Read-only.

Connection

Returns or sets a string that contains text file names that enable Excel to connect to text data sources. Object (object in C#).

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Integer (int in C#).

Parent

Returns an Object (object in C#) that represents the parent object of the specified TextConnection object. Read-only.

TextFileColumnDataTypes

Returns or sets an ordered array of constants that specify the data types applied to the corresponding columns in the text file that you’re importing into a query table. The default constant for each column is xlGeneral. Object (object in C#). Read/Write.

TextFileCommaDelimiter

True if the comma is the delimiter when you import a text file into a query table. False if you want to use some other character as the delimiter. The default value is False. Read/Write Boolean (bool in C#).

TextFileConsecutiveDelimiter

True if consecutive delimiters are treated as a single delimiter when you import a text file into a query table. The default value is False. Boolean (bool in C#) Read/Write.

TextFileDecimalSeparator

Returns or sets the decimal separator character that Excel uses when you import a text file into a query table. The default is the system decimal separator character. Read/Write String (string in C#).

TextFileFixedColumnWidths

Returns or sets an array of integers that correspond to the widths of the columns (in characters) in the text file that you’re importing into a query table. Valid widths are from 1 through 32767 characters. Read/Write Object (object in C#).

TextFileHeaderRow

Returns or sets value that specifies whether or not the first row (from the starting row) should be treated as a header row. Boolean (bool in C#) Read/Write.

TextFileOtherDelimiter

Returns or sets the character used as the delimiter when you import a text file into a query table. The default value is Nothing (a null reference (Nothing in Visual Basic) in C#). Read/Write String (string in C#).

TextFileParseType

Returns or sets the column format for the data in the text file that you’re importing into a query table. Read/Write XlTextParsingType.

TextFilePlatform

Returns or sets the origin of the text file you’re importing into the query table. This property determines which code page is used during the data import. Read/write XlPlatform.

TextFilePromptOnRefresh

True if you want to specify the name of the imported text file each time the query table is refreshed. The Import Text File dialog box allows you to specify the path and file name. The default value is False. Read/Write Boolean (bool in C#).

TextFileSemicolonDelimiter

True if the semicolon is the delimiter when you import a text file into a query table, and if the value of the TextFileParseType property is xlDelimited. The default value is False. Read/Write Boolean (bool in C#).

TextFileSpaceDelimiter

True if the space character is the delimiter when you import a text file into a query table. The default value is False. Read/Write Boolean (bool in C#).

TextFileStartRow

Returns or sets the row number at which text parsing will begin when you import a text file into a query table. Valid values are integers from 1 through 32767. The default value is 1. Read/Write Integer (int in C#).

TextFileTabDelimiter

True if the tab character is the delimiter when you import a text file into a query table. The default value is False. Read/Write Boolean (bool in C#).

TextFileTextQualifier

Returns or sets the text qualifier when you import a text file into a query table. The text qualifier specifies that the enclosed data is in text format. Read/Write XlTextQualifier.

TextFileThousandsSeparator

True for Excel to treat numbers imported as text that begin with a "-" symbol as a negative symbol. False for Excel to treat numbers imported as text that begin with a "-" symbol as text. Read/Write Boolean (bool in C#).

TextFileTrailingMinusNumbers

True for Excel to treat numbers imported as text that begin with a "-" symbol as a negative symbol. False for Excel to treat numbers imported as text that begin with a "-" symbol as text. Read/Write Boolean (bool in C#).

TextFileVisualLayout

Returns or sets an XlTextVisualLayoutType enumeration that indicates whether the visual layout of the text being imported is left-to-right or right-to-left. Read/Write.

Applies to