473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

After Applying KB arrticle Still Excel won't quit.

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...b;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()

Nov 20 '05 #1
7 2410
Hi Claudio,

Include the following:
objwb.Close()

objxl.DisplayAlerts = True

Marshal.ReleaseComObject(objws) ' this is the excel.worksheet object

objxl.Quit()

Marshal.ReleaseComObject(objxl) ' this is the excel.application object

HTH,

Bernie Yaeger

"Claudio Benghi" <bo******@hotmail.com> wrote in message
news:b6********************************@4ax.com...
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...b;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()

Nov 20 '05 #2
* "Bernie Yaeger" <be*****@cherwellinc.com> scripsit:
Include the following:
objwb.Close()

objxl.DisplayAlerts = True

Marshal.ReleaseComObject(objws) ' this is the excel.worksheet object

objxl.Quit()

Marshal.ReleaseComObject(objxl) ' this is the excel.application object


Isn't that what 'NAR' does?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
* Claudio Benghi <bo******@hotmail.com> scripsit:
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...b;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


Are you talking about Interop on Excel 2000, XP or the PIAs for Office
2003? It seems that you are mixing something up.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Thanks Bernie...

I've tried but it didnt' fix the problem

I suppose the copy method creates any implicit object I cannot NAR

any other Idea?

On Thu, 20 Nov 2003 08:55:26 -0500, "Bernie Yaeger"
<be*****@cherwellinc.com> wrote:
Hi Claudio,

Include the following:
objwb.Close()

objxl.DisplayAlerts = True

Marshal.ReleaseComObject(objws) ' this is the excel.worksheet object

objxl.Quit()

Marshal.ReleaseComObject(objxl) ' this is the excel.application object

HTH,

Bernie Yaeger

"Claudio Benghi" <bo******@hotmail.com> wrote in message
news:b6********************************@4ax.com.. .
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...b;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\L D_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()


Nov 20 '05 #5
On 20 Nov 2003 19:07:43 +0100, hi***************@gmx.at (Herfried K.
Wagner [MVP]) wrote:
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


Are you talking about Interop on Excel 2000, XP or the PIAs for Office
2003? It seems that you are mixing something up.


Sorry... I'm using Excel 2000...
I just meant that my pc also has Office XP PIA's installed.

Tomorrow I'll try to compile everything with vbnet 2002 and framweork
1.0

Thanks, Claudio
Nov 20 '05 #6
Thanks Bernie...

I've tried but it didnt' fix the problem

I suppose the copy method creates any implicit object I cannot NAR

any other Idea?

On Thu, 20 Nov 2003 08:55:26 -0500, "Bernie Yaeger"
<be*****@cherwellinc.com> wrote:
Hi Claudio,

Include the following:
objwb.Close()

objxl.DisplayAlerts = True

Marshal.ReleaseComObject(objws) ' this is the excel.worksheet object

objxl.Quit()

Marshal.ReleaseComObject(objxl) ' this is the excel.application object

HTH,

Bernie Yaeger

"Claudio Benghi" <bo******@hotmail.com> wrote in message
news:b6********************************@4ax.com.. .
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...b;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\L D_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()


Nov 20 '05 #7
On 20 Nov 2003 19:07:43 +0100, hi***************@gmx.at (Herfried K.
Wagner [MVP]) wrote:
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


Are you talking about Interop on Excel 2000, XP or the PIAs for Office
2003? It seems that you are mixing something up.


Sorry... I'm using Excel 2000...
I just meant that my pc also has Office XP PIA's installed.

Tomorrow I'll try to compile everything with vbnet 2002 and framweork
1.0

Thanks, Claudio
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Duncan Allen | last post by:
I've been using excel within VB.NET applications and I can't get it to close down and remove itself from memory. I'm using Visual Studio 2003 ver 7.1.3088, Framework 1.1, MS Office 2003 with MS VS...
3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
3
by: info | last post by:
After using clipboard functions in Excel controlled from Access VBA, Excel doesn't quit when I use the following ExcelApp.Quit Set ExcelApp = Nothing If I don't use the clipboard functions in...
1
by: Tony Hedge | last post by:
Hello, In my .NET code behind, I open up an excel file, and process all the rows in the worksheet that I'm interested in. Problem is when I'm done and issue the quit method. The EXCEL process...
3
by: Agnes | last post by:
Dim dsExcelExport As New System.Data.DataSet Dim daExcelExport As New System.Data.SqlClient.SqlDataAdapter Dim Excel As New Excel.Application Dim strExcelFile As String Dim strFileName As...
16
by: alexia.bee | last post by:
Hi all, In some weird reason, excel instance won;t die if i remove the comment from 4 lines of setting values into struct. here is a snipcode public...
9
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
10
by: Hendri Adriaens | last post by:
Hi, I'm trying to automate the creation of an excel file via COM. I copied my code below. I read many articles about how to release the COM objects that I create. The code below runs just fine...
3
by: Chris | last post by:
I have a python script that is driving Excel and using the win32com module. However, upon program completion there's still an Excel.exe process running in the background that I must terminate...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.