Dim dlg As New OpenFileDialog dlg.Filter = "Excel文件|*.xlsx" dlg.MultiSelect = True '允许选择多个文件 If dlg.ShowDialog =DialogResult.OK Then For Each fl As String In dlg.FileNames Dim mg As New Merger mg.SourcePath = fl mg.Format = "Excel" mg.SourceTableName = "订单$" mg.DataTableName = "订单" mg.Merge() Next End If