I have 20 SAS datasets and need to export them to different excel sheets. I have created a SAS macro to do this job. However, I have noticed a blank space at the end in the output.
For eg: "Creative" is getting exported as "Creative ".
As such, there is no blank space in the actual data and is appearing only after exporting the variables to excel. I have still included the following code to get rid these blanks
Filename out dde "excel|[Output.xlsm]!sheet1!r1c1:r10c25";
data want;
set have;
array vars (i) _char_;
do i=1 to dim(vars);
vars(i)=compress(vars(i));
end;
run;
data _null_;
Set want;
file out lrecl=1000 notab;
put
var1-var25;
run;
I appreciate your help.