Prev: Need only the first character of a sentence
Next: How to declare two arrays and loop in both of them?
From: zespri on 14 Apr 2010 02:47 Hi friend, I experience a problem which I try to write from SAS to word table. I have program as follow: (note: test is word document - could be test.doc; a1 is bookmark in word table. I try to insert one column of work.test data into bookmarked table ) options noxwait noxsync; filename testit dde 'winword|test!a1' notab; data _null_; set test; file testit; Put '[TableSelectColumn]' Put name; run; options xwait xsync; But result of above program is to write all into one cell including '[TableSelectColumn]', can you please help? Thank you
From: Tom Abernathy on 16 Apr 2010 21:53 On Apr 14, 2:47 am, zespri <stej...(a)gmail.com> wrote: > Hi friend, > > I experience a problem which I try to write from SAS to word table. > > I have program as follow: > (note: test is word document - could be test.doc; a1 is bookmark in > word table. I try to insert one column of work.test data into > bookmarked table ) > > options noxwait noxsync; > > filename testit dde 'winword|test!a1' notab; > > data _null_; > set test; > file testit; > Put '[TableSelectColumn]' > Put name; > run; > > options xwait xsync; > > But result of above program is to write all into one cell including > '[TableSelectColumn]', can you please help? Thank you Look at the @ option on the PUT statement. Also do you really want to repeatedly put '[TableSelectColumn]' for every observation in the dataset TEST? If not then put could add 'IF _N_=1 THEN ' before the PUT statement to make it only print once.
From: zespri on 18 Apr 2010 22:11
Hi Tom, What I am trying to do is to update a column in one time. at moment, I can only update a cell in word table. Do you have any idea to update a column in word table from SAS? Thank you Tom Abernathy wrote: > On Apr 14, 2:47 am, zespri <stej...(a)gmail.com> wrote: > > Hi friend, > > > > I experience a problem which I try to write from SAS to word table. > > > > I have program as follow: > > (note: test is word document - could be test.doc; a1 is bookmark in > > word table. I try to insert one column of work.test data into > > bookmarked table ) > > > > options noxwait noxsync; > > > > filename testit dde 'winword|test!a1' notab; > > > > data _null_; > > set test; > > file testit; > > Put '[TableSelectColumn]' > > Put name; > > run; > > > > options xwait xsync; > > > > But result of above program is to write all into one cell including > > '[TableSelectColumn]', can you please help? Thank you > > Look at the @ option on the PUT statement. > Also do you really want to repeatedly put '[TableSelectColumn]' for > every observation in the dataset TEST? > If not then put could add 'IF _N_=1 THEN ' before the PUT statement to > make it only print once. |