我有这个文件: 否TMNo EnNo命名GMNo模式DateTime 1 1 1 1 1 09/12/2006 11:09:58 2 1 2 1 2 09/12/2006 11:09:59 3 1 65535 1 3 09/12/2006 11:10:00 59949 1 20 1 20 09/13/2006 03:49:06 59950 1 24 1 21 09/13/2006 03:49:07
我需要从每一栏获取信息。 否 - GT;有一个5位数的最大值 EnNo->具有5digits的最大值 其余列最多可达2位
答案 0 :(得分:0)
这在概念上是您可能想要这样做的。
Dim inFile As StreamReader = File.OpenText("filename.txt")
Dim fields() As String
Do While (inFile.Peek <> -1)
' read the fields from the current line in the file
' split each line by a space according to your text file
fields = inFile.ReadLine.Split(" ")
' do something with each element in fields
Loop