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.

Deleting rows from an excel oleobject

2 posts in Appeon (partner product) Last posting was on 2004-03-25 01:32:14.0Z
Bill Walker Posted on 2004-03-24 17:06:26.0Z
Sender: 46f5.4061ba62.1804289383@sybase.com
From: Bill Walker
Newsgroups: sybase.public.appeon
Subject: Deleting rows from an excel oleobject
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <4061c012.475a.846930886@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Mar 2004 09:06:26 -0800
X-Trace: forums-1-dub 1080147986 10.22.241.41 (24 Mar 2004 09:06:26 -0800)
X-Original-Trace: 24 Mar 2004 09:06:26 -0800, 10.22.241.41
Lines: 23
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:177
Article PK: 12416

Following is a function that I have created to try and
delete a range of cells from an existing excel spreadsheet.
When its executed is deletes all of the cells and the tab
name of the active worksheet. What am I doing wrong?

OLEObject aetnaobject

aetnaobject = create oleobject
li_connect =
aetnaobject.connecttonewobject("excel.application")
if li_connect = 0 then
li_efile =
aetnaobject.connecttoobject("v:\productionreports\monthlyefiles\downloads\aetnaefiledownload.xls")
if li_efile = 0 then
aetnaobject.application.workbooks(1).worksheets(1). &
range("aetnaefiledownload!$A$2:$EJ$300").delete()
aetnaobject.application.workbooks(1).save()
aetnaobject.application.workbooks(1).close()
end if

li_close = aetnaobject.disconnectobject()

end if


Julie Jiang Posted on 2004-03-25 01:32:14.0Z
From: "Julie Jiang" <julie.jiang@appeon.net>
Newsgroups: sybase.public.appeon
References: <4061c012.475a.846930886@sybase.com>
Subject: Re: Deleting rows from an excel oleobject
Lines: 42
Organization: Appeon Corporation
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
NNTP-Posting-Host: 61.144.207.53
X-Original-NNTP-Posting-Host: 61.144.207.53
Message-ID: <4062369e@forums-1-dub>
Date: 24 Mar 2004 17:32:14 -0800
X-Trace: forums-1-dub 1080178334 61.144.207.53 (24 Mar 2004 17:32:14 -0800)
X-Original-Trace: 24 Mar 2004 17:32:14 -0800, 61.144.207.53
X-Authenticated-User: appeon
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:179
Article PK: 20619

Hi Bill,

Please post your question to the appropriate forum. I would like to point
out that the Appeon newsgroup is monitored by Sybase and Appeon engineering
staff who are very knowledgeable about Appeon issues. Question that are
purely PowerBuilder-related are best answered by the staff and users of the
PowerBuilder newsgroup.

Sorry.

Regards,
Julie Jiang
Appeon Corporation

<Bill Walker> wrote in message news:4061c012.475a.846930886@sybase.com...
> Following is a function that I have created to try and
> delete a range of cells from an existing excel spreadsheet.
> When its executed is deletes all of the cells and the tab
> name of the active worksheet. What am I doing wrong?
>
> OLEObject aetnaobject
>
> aetnaobject = create oleobject
> li_connect =
> aetnaobject.connecttonewobject("excel.application")
> if li_connect = 0 then
> li_efile =
>

aetnaobject.connecttoobject("v:\productionreports\monthlyefiles\downloads\ae
tnaefiledownload.xls")
> if li_efile = 0 then
> aetnaobject.application.workbooks(1).worksheets(1). &
> range("aetnaefiledownload!$A$2:$EJ$300").delete()
> aetnaobject.application.workbooks(1).save()
> aetnaobject.application.workbooks(1).close()
> end if
>
> li_close = aetnaobject.disconnectobject()
>
> end if