Dim dlg As new OpenFileDialog If dlg.ShowDialog = DialogResult.OK Then Dim Book As New XLS.Book(dlg.FileName) Dim Sheet As XLS.Sheet = Book.Sheets(0) Tables("学籍表").StopRedraw() Dim nms() As String = {"正班任","政治科任","数学科任","英语科任","化学科任","语文科任","物理科任"} For n As Integer = 1 To Sheet.Rows.Count -1 Dim bh As String = sheet(n,0).Text Dim drs As List(Of DataRow) = DataTables("学籍表").Select("班级 = '" & bh & "'") For Each dr As DataRow In drs For m As Integer = 0 To nms.Length - 1 dr(nms(m)) = Sheet(n,m).Value Next Next Next Tables("学籍表").ResumeRedraw() End If