Dear All,
I have a question related to proc report. I have a business case as below.
1) I have a report called sales which outputs to excel using tagsets
it contains three tabs
sales by country-tab1,
sales by region-tab2,
overall sales-tab3
The above output is generated based out of one SAS program.
2) I have a report called Growth/Decline Sales which outputs to excel using tagsets
-it contains two tabs
sales Growth/Decline country-tab1,
sales Growth/Decline by region-tab2,
Growth/Decline overall sales-tab3
The above output is generated based out of one SAS program.
Question:I want to combine these two different SAS reports and the resultant report should contain 6 excel tabs in a single excel(3 from program1 and 3 from program2).
Kindly advice.If someone could explain with example that would be really great.
Thanks all for your wonderful help in Advance.
Wish you all a very very happy new year.
Sreekanth:)
Output from ODS continues through a program until it is closed. Hence if you put:
ods tagsets.excelxp file=...;
Near the top of your program, and then do your reports outputting to a new tab each report. Then right at the end ods tagsets.excelxp close; it will all go out to the same file. So you will end up with one file with 6 tabs output.
Basically make your two programs one. You can use %include if needed, as long as you remove ODS TAGSETS FILE commands from each one.
E.G.
ODS TAGSETS.EXCELXP File=" " options(.....) style=journal;
*first program;
%include 'my_report1.sas';
*second program;
%include 'my_report2.sas';
ODS TAGSETS.EXCELXP close;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.