读取TXT文件存放到二维数组中
txt文本
1 2 3 4
a b c d
行数不固定 列数为6
我写的代码,求大神帮忙改改
Private Sub getTxt()
Dim Str As String
Dim sumStr(10000,5),tmp() As String
Dim n As Integer
Open "D:\abc.txt" For Input As #1
Do Unitl EOF(1)
Line Input #1,Str
tmp=Split(Str,Char(9))
For i=0 to 5
sumStr(n,i)=tmp(i)
next i
n=n+1
Loop
Close #1
End Sub