Microsoft Office Tutorials and References
In Depth Information
Table 19-3. FieldInfo Values for xlDelimited Text
Semicolon
Set to True to use a semicolon as delimiter.
Comma
Set to True to use a comma as delimiter.
Space
Set to True to use a space as delimiter.
Other
Set to True to use a character that is specified by the OtherChar argument as delimiter.
When Other is True , OtherChar specifies the delimiter character. If OtherChar contains
more than one character, only the first character is used.
The FieldInfo parameter is an array containing parse information for the individual source
columns. The interpretation of FieldInfo depends on the value of DataType .
When DataType is xlDelimited , the FieldInfo argument should be an array whose size is
the same as (or smaller than—see Table 19-3 ) the number of columns of converted data. The first
element of a two-element array is the column number (starting with the number 1), and the second
element is one of the numbers in Table 19-3 that specifies how the column is parsed.
Table 19-3. FieldInfo Values for xlDelimited Text
Code
Description
1
General
2
Text
3
MDY date
4
DMY date
5
YMD date
6
MYD date
7
DYM date
8
YDM date
9
Skip the column
If a two-element array for a given column is missing, then the column is parsed with the General
setting. For instance, the following value for FieldInfo causes the first column to be parsed as
text and the third column to be skipped:
Array(Array(1, 2), Array(3, 9))
All other columns will be parsed as general data.
To illustrate, consider the sheet shown in Figure 19-15 . The code:
Range("A1:A3").TextToColumns _
Destination:=Range("B1"), _
DataType:=xlDelimited, _
 
Search JabSto ::




Custom Search