有一个文件,我想将其分开并放入列中。看起来文件中的某些字段由空格分隔,其他字段由制表符分隔。我想格式化,以便名称和地址等在列中分开。
enter code here
strStarter = "RT 29 MONTPELIER VA 23100 23100"
intStarter = Len(strStarter)
For i = intStarter to 2 Step -1
strChars = Space(i)
strStarter = Replace(strStarter, strChars, " ")
strStarter1 = Replace(strStarter, vbTab, " " )
Next
arrStarter = Split(strStarter, " ")
arrStarter2= Split(strStarter1,vbTab)
For Each strUnit in arrStarter
Wscript.Echo strUnit
Next