SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

DDE Put is truncating once reaching spaces

Reply
N/A
Posts: 0

DDE Put is truncating once reaching spaces

I am trying to write a sentence including a macro variable and a statistic (col1 in my data) but the sentence is truncated after the first space. ("Form" is just printed)

filename &myfile. dde "excel|T1!r&rstart.c1:r&rstart.c1";
data _null_;
file &myfile.;
set t1_R1;
put "Form &frm." ; /* actually want "'Form &frm. (N=' col1 ')'"*/
run;

I'm new to DDE (well SAS actually) and am not sure how to avoid this problem.
There are no issues when I print col1 or &frm. without spaces.
Ideas?
Frequent Contributor
Posts: 145

Re: DDE Put is truncating once reaching spaces

Greetings.

Try notab option.

[pre]
FILENAME rr DDE "EXCEL|Sheet1!R2C1:R3C2" notab ;
%let t=Some string of text;
data _NULL_;
file rr;
put "&t";
run;
[/pre]

Oleg. Message was edited by: Oleg_L
N/A
Posts: 0

Re: DDE Put is truncating once reaching spaces

Thanks so much Oleg! My outputs are perfect now Smiley Happy
Post a Question
Discussion Stats
  • 2 replies
  • 231 views
  • 0 likes
  • 2 in conversation