sas DDE function provide an unexpected result when character variable used in the put statement. This unexpected result occure only when the character string contain more than one word.(Eg: Employee_name = "Ravi kumar". Word "Ravi" appeared in the Employee_Name column and "Kumar" appeared in the next column in the excel output. ) . How to resolve this issue? Please see the code below. data abc; input age 1-2 salary 4-8 name $ 10-25 ; cards; 35 60000 siva chnd guva 38 50000 manu gede ali ; run; %macro automation(sht,ds,r1,c1,r2,c2,var,cond); filename ciprod dde "excel|C:\OFFICE\RRS\[difference.xlsx]&sht.!r&r1.c&c1.:r&r2.c&c2."; data _null_; file ciprod; set &ds.; put &var.; &cond.; run; %mend automation; %automation(Employee_Data,abc,2,1,3,3,age name salary,) DDE Result ---------------- Age Name Salary 35 siva chnd 38 manu gede I need all the words in the variable "name" should be shone under Name column in the excel output.
... View more