Hi
I have a .net project written in vb.net and i am having a problem killing ALL instances of the excel process in the task manager. I had this problem with a windows service written in vb.net but I have managed to fix that problem but the same code doesnt fix the problem I am having in my website
The Code:
Dim exObj As New Excel.Application()
Dim exWorksheet As Excel.Worksheet
Dim exWorkbook As Excel.Workbook
exWorkbook = exObj.Workbooks.Open(("Template.xlt")
exWorksheet = exWorkbook.Worksheets(1)
Code in here which writes to the excel file and saves it for furture use
attempts to close the excel process
exWorkbook.Close()
exObj.Workbooks.Close()
exObj.Application.Quit()
exObj.Quit()
exWorksheet = Nothing
exWorkbook = Nothing
exObj = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
if anyone can help it would be much appreciated
I have a .net project written in vb.net and i am having a problem killing ALL instances of the excel process in the task manager. I had this problem with a windows service written in vb.net but I have managed to fix that problem but the same code doesnt fix the problem I am having in my website
The Code:
Dim exObj As New Excel.Application()
Dim exWorksheet As Excel.Worksheet
Dim exWorkbook As Excel.Workbook
exWorkbook = exObj.Workbooks.Open(("Template.xlt")
exWorksheet = exWorkbook.Worksheets(1)
Code in here which writes to the excel file and saves it for furture use
attempts to close the excel process
exWorkbook.Close()
exObj.Workbooks.Close()
exObj.Application.Quit()
exObj.Quit()
exWorksheet = Nothing
exWorkbook = Nothing
exObj = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
if anyone can help it would be much appreciated
Last edited by a moderator: