LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 31 Jul 2002 12:25:34 +0100
Reply-To:     Peter Crawford <peter.crawford@DB.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Crawford <peter.crawford@DB.COM>
Subject:      Re: DDE to excel and Zw. format
Comments: To: Richard.Simhon@CORNHILL.CO.UK, kviel@EMORY.EDU
Content-type: text/plain; charset=iso-8859-1

For numeric variables, can't we do this '=' business with a user picture format

This seems OK for up to 16 digits 949 proc format; 950 picture ddeNum(round) 951 other = '0000000000000000"'( prefix= '="' ) 952 ; NOTE: Format DDENUM has been output. 953 quit;

NOTE: PROCEDURE FORMAT used:

954 data _null_; 955 do e = 1,3,8,13,17; 956 val=10**e; 957 put val ddeNum. ; 958 end; 959 run;

="10" ="1000" ="100000000" ="10000000000000" 1E17 NOTE: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format. NOTE: DATA statement used:

Any suggestions to streamline this for character variables ?

HTH Peter Crawford

Datum: 31/07/2002 09:12 An: SAS-L@LISTSERV.UGA.EDU

Antwort an: Richard.Simhon@CORNHILL.CO.UK

Betreff: Re: DDE to excel and Zw. format Nachrichtentext:

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

> -----Original Message----- > From: Kevin Viel [SMTP:kviel@EMORY.EDU] > Sent: 31 July 2002 04:04 > To: SAS-L@LISTSERV.UGA.EDU > Subject: DDE to excel and Zw. format > > Greetings, > > I am trying to write character values of the possible form "01234" > from > SAS to Excel using DDE. I have SAS 8.2, Windows XP, and Excel 95. My > values in the Excel file are of the form "1234", even if I explicitly > change the cell format to text in Excel prior to my attempts. The same > thing happened when I used the following test datum: > > data _null_; > file GAIT; > x=1234; > format patient z5.; > put x; > run; > > Have I overlooked something (besides updating Excel <g>)? > > > Regards, > > Kevin > > -------------------------------- > > Kevin Viel > Department of Epidemiology > Rollins School of Public Health > Emory University > Atlanta, GA 30322

********************************************************************** Copyright in this message and any attachments remains with us. It is confidential and may be legally privileged. If this message is not intended for you it must not be read, copied or used by you or disclosed to anyone else. Please advise the sender immediately if you have received this message in error.

Although this message and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Cornhill Insurance PLC for any loss or damage in any way arising from its use.

Cornhill Insurance Plc, Registered in England number 84638, Registered Office 32 Cornhill, London EC3V 3LJ.

Member of the General Insurance Standards Council for general insurance business. **********************************************************************

--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Back to: Top of message | Previous page | Main SAS-L page