回複:Excel VBA (need help)



Dim FileName As String

FileName = "TEXT;C:\test.txt"



With ActiveSheet.QueryTables.Add(Connection:=FileName, Destination:=Range("J13"))

.Name = "test"
.FieldNames = True

.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With

所有跟帖: 

回複:回複:Excel VBA (need help) -lovchina- 給 lovchina 發送悄悄話 (112 bytes) () 03/31/2008 postreply 10:49:47

請您先登陸,再發跟帖!