Date: Wed, 31 Jul 2002 08:56:17 -0400
Reply-To: Kevin Viel <kviel@EMORY.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kevin Viel <kviel@EMORY.EDU>
Organization: Emory University
Subject: Re: DDE to excel and Zw. format
Content-Type: text/plain; charset=us-ascii
Richard.Simhon@cornhill.co.uk wrote:
>
> Kevin,
>
> If the cells in excel are formated as text then the following code will do
> the job
>
> data test;
> var="00123";
> var= '='||trim(var);
> run;
>
> filename data dde "excel|sheet2!r5c3:r5c3";
> data _null_;
> file data;
> set test;
> put var;
> run;
>
> Hope this helps
>
> Richard Simhon
> Business Analyst
> Allianz Cornhill
> Tel 01483 55 2628
>
Richard,
This did not work. However, you did shed some light on the subject.
The following put the value ="00123" which appeared as 00123 in the
cell:
filename data dde "excel|sheet2!r5c3:r5c3";
data _null_;
var='="00123"';
file data;
put var;
run;
This will provide me a solution, but shouldn't SAS be able write a
formatted value, such as z5. to Excel using DDE? It seems perhaps not,
at least using v8.2 and Excel 95.
Thanks,
Kevin
--------------------------------
Kevin Viel
Department of Epidemiology
Rollins School of Public Health
Emory University
Atlanta, GA 30322