这个你的第一列与第二列之间是空格或者tab隔开的话就简单了
Dim x(10000) as string,y(10000) as string
Open "c:\1.txt"(你的文件路径) for Input as #1
For i=0 to 9999
If Not EOF(1) then
Input #1,x(i),y(i)
Else
Exit For
End If
Close #1
如果是“,”隔开的也可以,但是必须是固定的隔开符号才行,本身很简单,贴一点出来
Dim s(10000) as string,x(10000) as string,y(10000) as string,a() as string
Open "c:\1.txt"(你的文件路径) for Input as #1
For i=0 to 9999
If Not EOF(1) then
Input #1,s(i)
a=Split(s(i),",")
x(i)=a(0)
y(i)=a(1)
Else
Exit For
End If
Close #1
不明白就hi me
or mail to
[email protected]本回答被提问者采纳