S
Sameh Ahmed
Hello there
I am facing that I faced before and a post helped me solve it.
now again I am facing the same problem with Excel as it doe not quit!
here's the code I am using
=================
Dim xapp As New Microsoft.Office.Interop.Excel.Application ' also used
ApplicationClass and it did not work either
Dim xbook As Microsoft.Office.Interop.Excel.Workbook
xbook = xapp.Workbooks.Open(ofd.FileName) ' gets the file name from an
openfiledialog
Dim i = 1
Dim field
For i = 1 To 5
field = xbook.Application.Cells(i, 1).value()
lv.Items.Add(field)
Next
xbook.Close()
xapp.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(xbook)
System.Runtime.InteropServices.Marshal.ReleaseComObject(xapp)
xapp = Nothing
xbook = Nothing
=================
Thanks in advance
Sameh
I am facing that I faced before and a post helped me solve it.
now again I am facing the same problem with Excel as it doe not quit!
here's the code I am using
=================
Dim xapp As New Microsoft.Office.Interop.Excel.Application ' also used
ApplicationClass and it did not work either
Dim xbook As Microsoft.Office.Interop.Excel.Workbook
xbook = xapp.Workbooks.Open(ofd.FileName) ' gets the file name from an
openfiledialog
Dim i = 1
Dim field
For i = 1 To 5
field = xbook.Application.Cells(i, 1).value()
lv.Items.Add(field)
Next
xbook.Close()
xapp.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(xbook)
System.Runtime.InteropServices.Marshal.ReleaseComObject(xapp)
xapp = Nothing
xbook = Nothing
=================
Thanks in advance
Sameh