Hi,
when I run 4 different proc reports and I get 4 different results. I want the results to be sent to one Excel file but on different tabs.
is it possible in SAS EG? and how?
Thanks,
Nazanin
Yes, but...
I couldn't find a way to do it using the EG point-and-click features. It's very easy to do in a code window. First, you have to turn off all of the result options in Tools -> Options -> the Results tab. Then submit code looking something like this:
ods _all_ close;
ods excel file="C:\Some Directory\SASTest.xlsx" style=EGDefault options(embedded_titles="no" embedded_footnotes="no" sheet_interval="proc");
proc print data=sashelp.class;
run;
proc means data=sashelp.cars;
class make;
var cylinders;
run;
proc tabulate data=sashelp.shoes;
class region;
var sales;
table region, sales*sum;
run;
ods _all_ close;
In your case, if you're comfortable, you can just grab the code generated in your 4 proc reports, and drop them into a program together.
Hopefully, someone a bit better with ODS will have a better suggestion.
Tom
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.