title: SAS- how to PROC EXPORT multiple PROC FREQ created by a macro?
body: <p>I have a macro which looks like this:</p>
  
  <pre><code>%macro mac_name (st, en=); 
    %do j=1 %to &amp;en.;
    %let k=%eval(&amp;j.+1);
        proc freq data=data_name;
          tables status&amp;j. * status&amp;k. / nocol norow nopercent missing;
        run;
    %end;
  %mend;
  %mac_name (st=1, en=%sysfunc(week(%sysfunc(today()), u)));
  </code></pre>
  
  <p>The output produces multiple proc freq tables with the same title.
  I need this output put into a excel spreadsheet. Ideally all proc freqs in one sheet, one above the other or separate sheets. </p>
  
  <p>Is this possible?</p>
  
  <p>Thanks in advance!!!</p>