Class TextConnection (Excel VBA)

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

Themes

The following procedures in this class have been grouped together and are described on a separate theme page

Row with its procedures TextFileHeaderRow and TextFileStartRow

Properties

Connection returns or sets a string that contains text file names that enable Microsoft Excel to connect to text data sources.

Parent returns an object 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 are importing into a query table. The default constant for each column is xlGeneral. Read/write Variant.

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.

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.

TextFileDecimalSeparator returns or sets the decimal separator character that Microsoft Excel uses when you import a text file into a query table. The default is the system decimal separator character.

TextFileFixedColumnWidths returns or sets an array of integers that correspond to the widths of the columns (in characters) in the text file that you are importing into a query table. Valid widths are from 1 through 32767 characters.

TextFileOtherDelimiter returns or sets the character used as the delimiter when you import a text file into a query table. The default value is null.

TextFileParseType returns or sets the column format for the data in the text file that you are importing into a query table.

TextFilePlatform returns or sets the origin of the text file that you are importing into the query table. This property determines which code page is used during the data import.

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.

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.

TextFileSpaceDelimiter true if the space character is the delimiter when you import a text file into a query table. The default value is False.

TextFileTabDelimiter true if the tab character is the delimiter when you import a text file into a query table. The default value is False.

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.

TextFileThousandsSeparator returns or sets the thousands separator character that Microsoft Excel uses when you import a text file into a query table. The default is the system thousands separator character.

TextFileTrailingMinusNumbers true for Microsoft Excel to treat numbers imported as text that begin with a - (minus) symbol as a negative symbol. False for Excel to treat numbers imported as text that begin with a - symbol as text.

TextFileVisualLayout returns or sets an XlTextVisualLayoutType value that indicates whether the visual layout of the text being imported is left-to-right or right-to-left.