A
Arniec
I wrote a program in vb.net 2005 to open a spread sheet, read data and then
close the spreadsheet. The probelm is it is not really closing.
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
' OPEN WORKSHEET AND DO STUFF
xlBook.Application.Visible = True
xlBook.Windows(1).Visible = True
xlBook.Application.WindowState = Excel.XlWindowState.xlMinimized
' Call loadSheet(xlbook.Worksheets(SheetName))
xlBook.Close(True)
xlApp.Quit()
NAR(xlBook)
NAR(xlApp)
Private Sub NAR(ByVal o As Object)
Try
System.Runtime.InteropServices.Marshal.ReleaseComObject(o)
Catch ex As Exception
Finally
o = Nothing
End Try
End Sub
Can someone tell me what I am doing wrong?
close the spreadsheet. The probelm is it is not really closing.
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
' OPEN WORKSHEET AND DO STUFF
xlBook.Application.Visible = True
xlBook.Windows(1).Visible = True
xlBook.Application.WindowState = Excel.XlWindowState.xlMinimized
' Call loadSheet(xlbook.Worksheets(SheetName))
xlBook.Close(True)
xlApp.Quit()
NAR(xlBook)
NAR(xlApp)
Private Sub NAR(ByVal o As Object)
Try
System.Runtime.InteropServices.Marshal.ReleaseComObject(o)
Catch ex As Exception
Finally
o = Nothing
End Try
End Sub
Can someone tell me what I am doing wrong?