Hello all
I have written a script that imports a *.txt files to excel and then retrieves needed information from that.
now i have to loop through certain files (*CPU.txt) in a directory.
I cannot find useable tutorials, the ones i tried failed on compilation...
this is my importation block:
Thanks
I have written a script that imports a *.txt files to excel and then retrieves needed information from that.
now i have to loop through certain files (*CPU.txt) in a directory.
I cannot find useable tutorials, the ones i tried failed on compilation...
this is my importation block:
Code:
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;d:\Diagnose_ARC56_CPU.txt" _
, Destination:=Range("A1"))
.Name = "Diagnose_ARC12_CPU_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(2, 2, 2, 2, 2, 2, 2)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With