Application.ImportTextAutoEx

This function imports a text file using auto formatting (with extended options).

Syntax Parameters Return Value
Function Application.ImportTextAutoEx( _
    fileName As String, _
    Optional fieldSeparator As Variant = 9, _
    Optional startImport As Long = 1, _
    Optional TextQualiferCode As TextImportQualifier = scTextImportQualifierNone, _
    Optional bTreatConsecutiveSeparatorsAsOne As Boolean = False, _
    Optional bCaseNamesFromFirstColumn As Boolean = False, _
    Optional bVariableNamesFromFirstRow As Boolean = False, _
    Optional bTrimLeadingSpace As Boolean = False) As Spreadsheet
  • fileName [in]

The fully-qualified pathway to the text file to import.

Type: String

  • fieldSeparator [in,optional]

Which ASCII character code shall be used as a separator in the text file when importing. This parameter defaults to 9, which implies a tab.

Type: Variant

Default value: 9

  • startImport [in,optional]

The first case to begin the import from. This parameter defaults to 1.

Type: Long

Default value: 1

  • TextQualiferCode [in,optional ]

The text qualifier, which specifies whether or not string values are quoted.

Type: TextImportQualifier

Default value: scTextImportQualifierNone

  • bTreatConsecutiveSeparatorsAsOne [in,optional]

Whether to treat consecutive separators as a single separator. This parameter defaults to False.

Type: Boolean

Default value: False

  • bCaseNamesFromFirstColumn [in,optional]

Whether or not to import the first column in the text file as the case names. This parameter defaults to False.

Type: Boolean

Default value: False

  • bVariableNamesFromFirstRow [in,optional]

Whether or not to import the first row in the text file as the variable names. This parameter defaults to False.

Type: Boolean

Default value: False

  • bTrimLeadingSpace [in,optional]

Whether or not to trim spaces after the imported cell values.

Type: Boolean

Default value: False

Spreadsheet