Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Excel OLEObject

7 posts in Objects Last posting was on 2009-02-04 16:18:54.0Z
Jeremy K Posted on 2009-02-03 22:59:15.0Z
Sender: 5092.4988cb78.1804289383@sybase.com
From: Jeremy K
Newsgroups: sybase.public.powerbuilder.objects
Subject: Excel OLEObject
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4988cc43.50b6.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Feb 2009 14:59:15 -0800
X-Trace: forums-1-dub 1233701955 10.22.241.41 (3 Feb 2009 14:59:15 -0800)
X-Original-Trace: 3 Feb 2009 14:59:15 -0800, 10.22.241.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9802
Article PK: 736943

I have a process that uses code from a technical document
(ID: 47867). It creates an Excel OLEObject. My issue is
that I'm unable to delete the excel files after I've
processed them because Excel.exe is still running as a
process. Once I cancel this process, I can delete the
file(s). This code destroys the object that I create, so
I'm not sure what needs to be done to close this process.
Any help would be greatly appreciated. Thanks.


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2009-02-04 00:16:41.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Excel OLEObject
References: <4988cc43.50b6.1681692777@sybase.com>
In-Reply-To: <4988cc43.50b6.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4988de69$1@forums-1-dub>
Date: 3 Feb 2009 16:16:41 -0800
X-Trace: forums-1-dub 1233706601 10.22.241.152 (3 Feb 2009 16:16:41 -0800)
X-Original-Trace: 3 Feb 2009 16:16:41 -0800, vip152.sybase.com
Lines: 21
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9803
Article PK: 736934

Terry Dykstra posted this in the General group about ten minutes ago.
It's for MS Word, but I'm sure Excel is pretty darn close:

You need something like this:

wordobj.Application.quit
wordobj.DisconnectObject()
DESTROY wordobj

Jeremy K wrote:
> I have a process that uses code from a technical document
> (ID: 47867). It creates an Excel OLEObject. My issue is
> that I'm unable to delete the excel files after I've
> processed them because Excel.exe is still running as a
> process. Once I cancel this process, I can delete the
> file(s). This code destroys the object that I create, so
> I'm not sure what needs to be done to close this process.
> Any help would be greatly appreciated. Thanks.


Jeremy K Posted on 2009-02-04 15:38:22.0Z
Sender: 5092.4988cb78.1804289383@sybase.com
From: Jeremy K
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Excel OLEObject
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4989b66e.6511.1681692777@sybase.com>
References: <4988de69$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Feb 2009 07:38:22 -0800
X-Trace: forums-1-dub 1233761902 10.22.241.41 (4 Feb 2009 07:38:22 -0800)
X-Original-Trace: 4 Feb 2009 07:38:22 -0800, 10.22.241.41
Lines: 29
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9804
Article PK: 736942

Thank you for the response Terry. Unfortunately, this did
not close the Excel.exe process. I'm going to look at the
Word post and look through some more of the messageboard.
If you can think of anything else, I'd be happy to try.
Thanks again!

> Terry Dykstra posted this in the General group about ten
> minutes ago. It's for MS Word, but I'm sure Excel is
> pretty darn close:
>
> You need something like this:
>
> wordobj.Application.quit
> wordobj.DisconnectObject()
> DESTROY wordobj
>
>
>
>
> Jeremy K wrote:
> > I have a process that uses code from a technical
> > document (ID: 47867). It creates an Excel OLEObject.
> > My issue is that I'm unable to delete the excel files
> > after I've processed them because Excel.exe is still
> > running as a process. Once I cancel this process, I can
> > delete the file(s). This code destroys the object that
> > I create, so I'm not sure what needs to be done to close
> > this process. Any help would be greatly appreciated.
> Thanks.


Terry Dykstra [TeamSybase] Posted on 2009-02-04 15:52:51.0Z
Reply-To: "Terry Dykstra [TeamSybase]" <dontreply_tddykstra@forestoil.ca.x>
From: "Terry Dykstra [TeamSybase]" <tddykstra@forestoil.ca>
Newsgroups: sybase.public.powerbuilder.objects
References: <4988de69$1@forums-1-dub> <4989b66e.6511.1681692777@sybase.com>
Subject: Re: Excel OLEObject
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4989b9d3$1@forums-1-dub>
Date: 4 Feb 2009 07:52:51 -0800
X-Trace: forums-1-dub 1233762771 10.22.241.152 (4 Feb 2009 07:52:51 -0800)
X-Original-Trace: 4 Feb 2009 07:52:51 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9806
Article PK: 736935

Well, that code actually was originally for Excel and I just changed it to
Word for that message. I probably should have coded a bit more. I use this
code and it works (at least up to Excel 2002).

ioo_excel.activeworkbook.close()
ioo_excel.Application.quit // Ensure Excel is closed properly
ioo_excel.DisconnectObject()
DESTROY ioo_excel

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

<Jeremy K> wrote in message news:4989b66e.6511.1681692777@sybase.com...
> Thank you for the response Terry. Unfortunately, this did
> not close the Excel.exe process. I'm going to look at the
> Word post and look through some more of the messageboard.
> If you can think of anything else, I'd be happy to try.
> Thanks again!
>
>> Terry Dykstra posted this in the General group about ten
>> minutes ago. It's for MS Word, but I'm sure Excel is
>> pretty darn close:
>>
>> You need something like this:
>>
>> wordobj.Application.quit
>> wordobj.DisconnectObject()
>> DESTROY wordobj
>>
>>
>>
>>
>> Jeremy K wrote:
>> > I have a process that uses code from a technical
>> > document (ID: 47867). It creates an Excel OLEObject.
>> > My issue is that I'm unable to delete the excel files
>> > after I've processed them because Excel.exe is still
>> > running as a process. Once I cancel this process, I can
>> > delete the file(s). This code destroys the object that
>> > I create, so I'm not sure what needs to be done to close
>> > this process. Any help would be greatly appreciated.
>> Thanks.


Jeremy K Posted on 2009-02-04 16:18:54.0Z
Sender: 5092.4988cb78.1804289383@sybase.com
From: Jeremy K
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Excel OLEObject
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4989bfee.662c.1681692777@sybase.com>
References: <4989b9d3$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Feb 2009 08:18:54 -0800
X-Trace: forums-1-dub 1233764334 10.22.241.41 (4 Feb 2009 08:18:54 -0800)
X-Original-Trace: 4 Feb 2009 08:18:54 -0800, 10.22.241.41
Lines: 54
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9808
Article PK: 736939

I changed my code to use activeworkbook.close() and this
works. I think I'd rather use this instead of workbook(1).
Thanks for your help!

> Well, that code actually was originally for Excel and I
> just changed it to Word for that message. I probably
> should have coded a bit more. I use this code and it
> works (at least up to Excel 2002).
>
> ioo_excel.activeworkbook.close()
> ioo_excel.Application.quit // Ensure Excel is closed
> properly ioo_excel.DisconnectObject()
> DESTROY ioo_excel
>
> --
> Terry Dykstra (TeamSybase)
> http://powerbuilder.codeXchange.sybase.com/
> http://casexpress.sybase.com
> product enhancement requests:
> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
> <Jeremy K> wrote in message
> > news:4989b66e.6511.1681692777@sybase.com... Thank you
> > for the response Terry. Unfortunately, this did not
> > close the Excel.exe process. I'm going to look at the
> > Word post and look through some more of the
> messageboard. If you can think of anything else, I'd be
> > happy to try. Thanks again!
> >
> >> Terry Dykstra posted this in the General group about
> ten >> minutes ago. It's for MS Word, but I'm sure Excel
> is >> pretty darn close:
> >>
> >> You need something like this:
> >>
> >> wordobj.Application.quit
> >> wordobj.DisconnectObject()
> >> DESTROY wordobj
> >>
> >>
> >>
> >>
> >> Jeremy K wrote:
> >> > I have a process that uses code from a technical
> >> > document (ID: 47867). It creates an Excel OLEObject.
> >> > My issue is that I'm unable to delete the excel files
> >> > after I've processed them because Excel.exe is still
> >> > running as a process. Once I cancel this process, I
> can >> > delete the file(s). This code destroys the
> object that >> > I create, so I'm not sure what needs to
> be done to close >> > this process. Any help would be
> greatly appreciated. >> Thanks.
>
>