C
Claudio Benghi
Hello World,
I've found a problem regarding Interop on Excel 2000.
Here's KB article where the problem should be discussed:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;317109
After Applying KB arrticle Still Excel won't quit after subroutine if.
oSheet.Copy(oSheet, )
function is executed.
If I omit the above line from the code everything works fine... any
ideas?
I've read that OXPPIAs have been tested under framework 1.0 and I'm
actually using visual studio 2003 but I cant' revert my project to
2002...
Reproducting behaviour code follows...
Thanks,
Claudio
------------------------------------
Dim oExcel As Object
Dim oBook As Object
Dim oWbs As Object
Dim oWb As Object
Dim oSheets As Object
Dim oSheet As Object
oExcel = CreateObject("Excel.Application")
oExcel.visible = True
System.Threading.Thread.CurrentThread.Sleep(3000)
oWbs = oExcel.Workbooks
oWb =
oWbs.Open("C:\Bonghi\Ddm\LagDuf\JSR\jsr_dot_net\LD_JSR\Reports\store\1.xls")
oSheets = oWb.sheets
oSheet = oSheets(1)
oSheet.Copy(oSheet, ) ' <--- This line causes Excel task not to quit
oWb.Save()
' NAR sub Taken from KB Article
'
NAR(oSheet)
NAR(oSheets)
NAR(oWb)
NAR(oWbs)
oExcel.quit()
NAR(oExcel)
GC.Collect()
I've found a problem regarding Interop on Excel 2000.
Here's KB article where the problem should be discussed:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;317109
After Applying KB arrticle Still Excel won't quit after subroutine if.
oSheet.Copy(oSheet, )
function is executed.
If I omit the above line from the code everything works fine... any
ideas?
I've read that OXPPIAs have been tested under framework 1.0 and I'm
actually using visual studio 2003 but I cant' revert my project to
2002...
Reproducting behaviour code follows...
Thanks,
Claudio
------------------------------------
Dim oExcel As Object
Dim oBook As Object
Dim oWbs As Object
Dim oWb As Object
Dim oSheets As Object
Dim oSheet As Object
oExcel = CreateObject("Excel.Application")
oExcel.visible = True
System.Threading.Thread.CurrentThread.Sleep(3000)
oWbs = oExcel.Workbooks
oWb =
oWbs.Open("C:\Bonghi\Ddm\LagDuf\JSR\jsr_dot_net\LD_JSR\Reports\store\1.xls")
oSheets = oWb.sheets
oSheet = oSheets(1)
oSheet.Copy(oSheet, ) ' <--- This line causes Excel task not to quit
oWb.Save()
' NAR sub Taken from KB Article
'
NAR(oSheet)
NAR(oSheets)
NAR(oWb)
NAR(oWbs)
oExcel.quit()
NAR(oExcel)
GC.Collect()