Application.ImportTextAutoEx2
This function imports a text file using auto formatting.
Syntax | Parameters | Return Value |
---|---|---|
Function Application.ImportTextAutoEx2( _ fileName As String, _ Optional fieldSeparator As Variant = 9, _ Optional startImport As Long = 1, _ Optional TextQualiferCode As TextImportQualifier = scTextImportQualifierNone, _ Optional TreatConsecutiveSeparatorsAsOne As Boolean = False, _ Optional CaseNamesFromFirstColumn As Boolean = False, _ Optional VariableNamesFromFirstRow As Boolean = False, _ Optional TrimLeadingSpace As Boolean = False, _ Optional IgnoreBlankLines As Boolean = False, _ Optional NoCreateTextLabels As Boolean = False, _ Optional TreatDotAsMissingData As Boolean = False, _ Optional CreateTextVariable As Boolean = False, _ Optional Threshold As Variant = 0) As Spreadsheet |
The fully-qualified pathway to the text file to import. Type: String 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 The first case to begin the import from. This parameter defaults to 1. Type: Long Default value: 1 The text qualifier, which specifies whether or not string values are quoted. Type: TextImportQualifier Default value: scTextImportQualifierNone Whether to treat consecutive separators as a single separator. This parameter defaults to False. Type: Boolean Default value: False 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 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 Whether or not to trim spaces after the imported cell values. Type: Boolean Default value: False Whether or not to ignore blank lines. If this is set to False, then empty lines will be imported as rows of missing data. Type: Boolean Default value: False Whether or not text labels should be used. If set to True, then any text labels in the file will be imported as missing data. If set to False, then any text in the file will be imported as text labels. Type: Boolean Default value: False Whether or not values (cells) that are just periods should be imported as missing data. This is useful for importing text files exported from SAS. Type: Boolean Default value: False Whether or not textual columns should be imported as text variables (rather than double variables with text labels). False is recommended for this parameter, unless the columns contain lengthy strings. Type: Boolean Default value: False The threshold value for determining if a column is textual. Type: Variant Default value: 0 |
Spreadsheet |