Many thanks for reply.
Yes, you are correct it is on the server, I am aware of the licensing issues
and lack of support from Microsoft.
Code section
Dim objExcelApplication As Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objWorkbooks As Excel.Workbooks
Dim objWorksheets As Excel.Worksheets
Dim objWorksheet As Excel.Worksheet
Dim dsExcelMenu As rdsExcelMenu
Try
Try
objExcelApplication = New Excel.Application
objExcelApplication.Visible = False
objExcelApplication.DisplayAlerts = False
Catch ex As Exception
'>>> Excel Error
Throw ex
End Try
Try
objWorkbooks = objExcelApplication.Workbooks
objWorkbooks.Open(strWorkbook, False, True)
objWorkbook = objWorkbooks.Item(1)
Catch ex As Exception
'>>> Workbook Open Error
Throw ex
End Try
** process here etc
Catch ex As Exception
Throw ex
Finally
If Not objWorksheet Is Nothing Then
ReleaseComObject(objWorksheet)
End If
If Not objWorksheets Is Nothing Then
ReleaseComObject(objWorksheets)
End If
If Not objWorkbook Is Nothing Then
objWorkbook.Close(False)
ReleaseComObject(objWorkbook)
End If
If Not objWorkbooks Is Nothing Then
ReleaseComObject(objWorkbooks)
End If
If Not objExcelApplication Is Nothing Then
objExcelApplication.Quit()
ReleaseComObject(objExcelApplication)
End If
GC.Collect()
GC.WaitForPendingFinalizers()
End Try
'================================================= ===============
Private Sub ReleaseComObject(ByRef Reference As Object)
Try
Do Until
System.Runtime.InteropServices.Marshal.ReleaseComO bject(Reference) <= 0
Loop
Catch
Finally
Reference = Nothing
GC.Collect()
End Try
End Sub
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:eP**************@TK2MSFTNGP10.phx.gbl...
I'm assuming you mean its running on the server and not client?
and could you show how you release this component and call it.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Tim Marsden" <TM@UK.COM> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl... Hi,
I have a routine which is call from a ASP.NET web form. This routine
creates an excel application, opens a workbook , runs some code to update the
workbook, saves it as HTML on the sever and returns to the Web form to
display.
All is OK, except EXCEL remains in the process list in task manager.
I am following all guideline in releasing the com components.
Regards
Tim