[求助]导入代码加了 App.Quit 但程序里还是有excel程序
Dim dlg As New OpenFileDialog
dlg.Filter= "Excel文件|*.xls"
If dlg.ShowDialog = DialogResult.Ok Then
Dim mg As New Merger
mg.SourcePath = dlg.FileName
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(dlg.FileName)
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
App.Quit
mg.SourceTableName = Ws.Name & "$" '指定要合并的表
mg.Format = "excel" '指定格式
mg.DataTableName = "表A" '指定接收数据的表
mg.Merge() '开始合并
End If

此主题相关图片如下:12.jpg

附近在这个帖子中:
http://www.datasoft.com.cn/dispbbs.asp?boardid=2&Id=10486