Dim dlg As New OpenFileDialog dlg.Filter = "Excel文件|*.xls" dlg.MultiSelect = True '允许选择多个文件 If dlg.ShowDialog =DialogResult.OK Then For Each fl As String In dlg.FileNames Dim Book As New XLS.Book(fl) Dim mg As New Merger mg.SourcePath = fl mg.Format = "Excel" mg.SourceTableName = Book.Sheets(0).Name & "$" mg.DataTableName = "时间" mg.Merge() Next End If