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 (May 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 16 May 2008 14:37:42 -0400
Reply-To:     Jake Bee <johbee@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jake Bee <johbee@GMAIL.COM>
Subject:      Re: How to have SAS put out a string with blanks in single cells
              in Excel
Comments: To: "Howard Schreier <hs AT dc-sug DOT org>"
          <schreier.junk.mail@gmail.com>
In-Reply-To:  <200805161302.m4GAnLoc012013@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1

Yes, Thanks, this works, sort of ... but not in my array example. I had tried it earlier, but then posted when it failed with my array.

Any other ideas appreciated.

Thanks!

Jake

On 5/16/08, Howard Schreier <hs AT dc-sug DOT org> < schreier.junk.mail@gmail.com> wrote: > > On Thu, 15 May 2008 22:48:02 -0400, Jake Bee <johbee@GMAIL.COM> wrote: > > >Dear SAS-L: > > > > > >Is the a way to have SAS put out strings with spaces in single cells? I > >tried using '09'x and lrecl=6 in the code below. > > Close. Use the NOTAB option in the FILENAME statement. That will put > everything in one cell, so place the tab literal ('09'x) in the PUT > statement wherever you want to jump to the next column. > > > > >The code below creates 6 columns in excel. I only want 2 columns > >(regardless of the r1c6 endpoint). The 2 columns > > > >should have 'a b c' in c1 and 'l t jb' in c2. Can this be done in SAS to > >excel via DDE. Thanks for any information! > > > > > >Jake > > > > > > > > > >%let file_var1 = > >d:\bee\spreadsheets\[test.xls]sheet1!r1c1:r1c6; > > > > > > > > > > > > > > > >filename out dde > >"excel|&file_var1"; > > "excel|&file_var1" NOTAB ; > > > > > > > > > > >data > >a; > > > > length x1-x2 > >$6; > > > > x1='a b > >c'; > > > > > > x2='l t > >jb'; > > > >run; > > > > > > > > > >data > >_null_; > > > > > > set > >a; > > > > array x(2) > > > > > > x1 - > >x2; > > > > file out; > > > > > > do i = 1 to > >2; > > > > put x(i)@; > > put x(i) '09'X @; > > > > > > > end; > > > > > > > >put; > > > > > >run; >


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