Hello friends, I have 5 SAS tables. I want to export them to one excel file as following: Tables Pop1 ,Pop2,Pop3 to have in sheet1 (side by side to each other) Tables Ref1 ,Ref2 to have in sheet2 (side by side to each other) Please mention that I want all tables to be in one excel file (with two sheets as I explained before) Data pop1; input x; cards; 1 2 ; Run; Data pop2; input x; cards; 3 4 ; Run; Data pop3; input x; cards; 5 6 ; Run; Data Ref1; input w; cards; 10 20 ; Run; Data Ref2; input x; cards; 30 40 ; Run; %macro mmacro1; %do k=1 %to 3; Title "pop&k."; proc print data=pop&k. noobs; footnote; Run; %end; %mend; %mmacro1; %macro mmacro2; %do k=1 %to 2; Title "Ref&k."; proc print data=Ref&k. noobs; footnote; Run; %end; %mend; %mmacro2;
... View more