Dim dlg As New OpenFileDialog
dlg.MultiSelect = Truedlg.Filter= "Excel文件|*.xls;*.xlsx"
If dlg.ShowDialog = DialogResult.OK Then
For Each file As String In dlg.FileNames
Dim Book As New XLS.Book(file) Dim Sheet As XLS.Sheet = Book.Sheets(0)
If DataTables("POlist").Find("P") Is Nothing Then
Dim dr As DataRow = DataTables("POlist").AddNew
dr("PONo") = sheet(3,5).Text
dr("PODate") = sheet(4,5).text
Dim i As Integer = 10
Do While (sheet(i,0).Text)<>""
Dim dro As DataRow = DataTables("PO").AddNew
i = i + 1
Loop
End If
Next
End If