BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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?
2 REPLIES 2
Oleg_L
Obsidian | Level 7
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
deleted_user
Not applicable
Thanks so much Oleg! My outputs are perfect now 🙂

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 2 replies
  • 1408 views
  • 0 likes
  • 2 in conversation