bin版老师的不太理解,而且导入不全,这样也可以········ :
Dim dlg As New OpenFileDialog
If dlg.ShowDialog = DialogResult.Ok Then
Dim rs As String = FileSys.ReadAllText(dlg.FileName)
For i As Integer = 0 To rs.split(chr(10) & chr(13)).length -1
If rs.split(chr(10) & chr(13))(i).contains("'")
Dim szh As String = rs.split(chr(10) & chr(13))(i).replace("'","")
Dim dr As Row = Tables("表A").AddNew
For j As Integer=0 To Tables("表A").Cols.Count-1
If j = 0
dr(Tables("表A").Cols(j)) = szh.split(",")(j)
ElseIf j =1 Then
dr(Tables("表A").Cols(j)) = "按科目号另外生成"
Else
dr(Tables("表A").Cols(j)) = val(szh.split(",")(j-1))
End If
Next
End If
Next
End If
MessageBox.show("完成!")