--
Dim dlg As New OpenFileDialog
dlg.Filter = "Excel文件|*.xls"
If dlg.ShowDialog = DialogResult.OK Then
Dim Book As New XLS.Book(dlg.FileName)
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Dim drr As DataRow = DataTables("员工").find("编号=\'" & sheet(1,1).Text & "\'")
If drr Is Nothing Then
Dim dr As DataRow = DataTables("员工").AddNew
dr("编号") = sheet(1,1).Text
dr("姓名") = sheet(2,1).text
dr("出生年月") = sheet(2,3).text
dr("职位") = sheet(3,3).text
dr("月薪") = sheet(4,1).text
dr("公积金") = IIF(sheet(4,4).text="-",Nothing,sheet(4,4).text)
dr("入职时间") = sheet(3,1).text
dr("档案时间") = sheet(1,4).text
End If
End If