Dim dlg As new OpenFileDialog
dlg.Filter = "文本文件|*.txt"
If dlg.ShowDialog = DialogResult.OK Then
Dim strs As String = FileSys.ReadAllText(dlg.FileName)
strs = strs.Replace(vblf,"")
Dim rs() As String = strs.Split(vbcr)
Dim dr As DataRow = DataTables("表A").Addnew()
For i As Integer = 0 To rs.Length - 1
Dim cs() As String = rs(i).Split(" ")
Dim cname As String = ""
For Each s As String In cs
If s > "" Then
If cname = "" Then
cname = s
Else
dr(cname) = s
exit for
End If
End If
Next
Next
End If