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.

Copy&Pase to Datawindow

2 posts in DataWindow Last posting was on 2009-02-24 17:28:07.0Z
Iliana Posted on 2009-02-24 15:53:44.0Z
Sender: 7aa.49a322e3.1804289383@sybase.com
From: Iliana
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Copy&Pase to Datawindow
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49a41808.1d4a.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Feb 2009 07:53:44 -0800
X-Trace: forums-1-dub 1235490824 10.22.241.41 (24 Feb 2009 07:53:44 -0800)
X-Original-Trace: 24 Feb 2009 07:53:44 -0800, 10.22.241.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88856
Article PK: 418109

Hi

I am using Powerbuilder 10.5 and I want to know how to use
the copy and paste function from Excel to a Datawindow?

Thanks.

Iliana


Terry Dykstra [TeamSybase] Posted on 2009-02-24 17:28:07.0Z
Reply-To: "Terry Dykstra [TeamSybase]" <dontreply_tddykstra@forestoil.ca.x>
From: "Terry Dykstra [TeamSybase]" <tddykstra@forestoil.ca>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49a41808.1d4a.1681692777@sybase.com>
Subject: Re: Copy&Pase to Datawindow
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49a42e27@forums-1-dub>
Date: 24 Feb 2009 09:28:07 -0800
X-Trace: forums-1-dub 1235496487 10.22.241.152 (24 Feb 2009 09:28:07 -0800)
X-Original-Trace: 24 Feb 2009 09:28:07 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88857
Article PK: 418108

Here is some code I use to paste a row of data from Excel. In my case I
restrict it specifically to a grid style dw where the user can only enter
numeric values.

string ls_clipboard, ls_values[]
long ll_col,
int li_rc, li_colcnt, i
dec ldec_value


ls_clipboard = clipboard( )
gf_parse_plus( ls_clipboard, ls_values, li_colcnt, "~t") // a function
to parse a tab separated string into an array
FOR i = 1 TO li_colcnt
dw_base.setitem( row, ll_col, dec(ls_values[i]))
ll_col = ll_col + 1
END FOR

--
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

<Iliana> wrote in message news:49a41808.1d4a.1681692777@sybase.com...
> Hi
>
> I am using Powerbuilder 10.5 and I want to know how to use
> the copy and paste function from Excel to a Datawindow?
>
> Thanks.
>
> Iliana