Sub test()
Dim qt As QueryTable
Set qt = ActiveSheet.QueryTables.Add("TEXT;d:\20160703.txt", [a1])
With qt
.AdjustColumnWidth = False
.TextFileParseType = xlDelimited
.TextFileTabDelimiter = True
.TextFileCommaDelimiter = True
.Refresh
End With
End Sub
用以上方式 , excel读取会空一格 , 麻烦大大
https://www.dropbox.com/s/4uxgfuykhl0h6ix/VBA%20TAB%20format.PNG?dl=0