Dim dlg As
New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter= "Excel文件|*.xls"
'设置筛选器
If dlg.ShowDialog = DialogResult.Ok
Then
'如果用户单击了确定按钮 Dim mg As New
Merger mg.SourcePath = dlg.FileName mg.Format = "excel"
'指定格式 mg.SourceTableName = "订单$"
'指定要合并的表 mg.DataTableName = "订单"
'指定接收数据的表 mg.Merge() '开始合
End
If