主题:vb.net调用Excel模块打印的新问题
我用在VB中可用的方法,
Dim objEx As New Excel.ApplicationClass
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
'objEx = CreateObject("Excel.Application")
wb = objEx.Workbooks().Add(Application.StartupPath & "\fd.xlt")
ws = wb.Sheets.Item(1)
ws.Activate()
........
........
wb.Close(savechanges:=False)
ws = Nothing
wb = Nothing
'objEx.DisplayAlerts = False
objEx.Application.Quit()
objEx = Nothing
可在VB.NET中,可运行,运行结束后,出现一个新问题,,,
[b]就是 WINDOW任务管理器中有个 Excel.exe的进程,结束不了,
越打印越多,,相当占资源[/b]
objEx.Application.Quit()
objEx = Nothing
无法关闭excel.exe进程
怎样去解决这问题,
请同行前辈指教小辈,先谢了!
[em18]
Dim objEx As New Excel.ApplicationClass
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
'objEx = CreateObject("Excel.Application")
wb = objEx.Workbooks().Add(Application.StartupPath & "\fd.xlt")
ws = wb.Sheets.Item(1)
ws.Activate()
........
........
wb.Close(savechanges:=False)
ws = Nothing
wb = Nothing
'objEx.DisplayAlerts = False
objEx.Application.Quit()
objEx = Nothing
可在VB.NET中,可运行,运行结束后,出现一个新问题,,,
[b]就是 WINDOW任务管理器中有个 Excel.exe的进程,结束不了,
越打印越多,,相当占资源[/b]
objEx.Application.Quit()
objEx = Nothing
无法关闭excel.exe进程
怎样去解决这问题,
请同行前辈指教小辈,先谢了!
[em18]