LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 2 Nov 2004 17:07:36 -0500
Reply-To:   "Huang, Ya" <yhuang@AMYLIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Huang, Ya" <yhuang@AMYLIN.COM>
Subject:   Re: Column/Field Names
Comments:   To: Sen Huynh <senthuynh@YAHOO.COM>

One of the advantage of using ODS/html to create a 'xls' file (which is actually html format, but excel can read it without problem. Make sure you save it as xls file, if you really want it to be a real xls file), is that it preserve the 'label', which can be a long string with space in it. Another advatange of this trick is that it is so easy, all you need is two line:

ods html file="c:\temp\junk.xls" style=minimal;

PROC PRINT DATA=JOINED LABEL NOOBS; VAR MRN REG_DT SYS_RANGE DIA_RANGE; LABEL REG_DT = 'BP Date' SYS_RANGE = 'Sys Range' DIA_RANGE = 'Dia Range'; FORMAT SYS_RANGE $SYSTOL. DIA_RANGE $DIASTOL. REG_DT MMDDYY10.; RUN;

ods html close;

Kind regards,

Ya Huang On Tue, 2 Nov 2004 13:40:59 -0800, s huynh <senthuynh@YAHOO.COM> wrote:

>Hi, > >I'm working on mainframe and not SAS Windows. Can >anyone share with me how I can get the column headings >to appear in one cell once downloaded into Excel? > >MRN BP Date Sys Range Dia Range > >In mainframe it looks like above, but once I >downloaded the file into Excel the column names look >like below. I would like the Sys Range to appear in >one cell (cell C1 rather than cells C1 and C2) and the >same with Dia Range. > > Sys Dia >MRN BP Date Range Range > > > > DATA JOINED; > LENGTH SYS_RANGE DIA_RANGE $15; > SET JOINED; > BY MRN; >. >. >. > > PROC PRINT DATA=JOINED LABEL NOOBS; >VAR MRN REG_DT SYS_RANGE DIA_RANGE; >LABEL REG_DT = 'BP Date' > SYS_RANGE = 'Sys Range' > DIA_RANGE = 'Dia Range'; >FORMAT SYS_RANGE $SYSTOL. DIA_RANGE $DIASTOL. REG_DT >MMDDYY10.; > RUN; > > >TIA, >Sen > > > > >__________________________________ >Do you Yahoo!? >Check out the new Yahoo! Front Page. >www.yahoo.com


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