0

我有这个文件: No TMNo EnNo Name GMNo Mode 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

我需要从每一列中获取信息。No-> 最多为 5 位 EnNo-> 最多为 5 位 其余列最多为 2 位

4

1 回答 1

0

This is conceptually how you might want to do that.

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
于 2013-03-11T22:10:56.237 回答