Hey guys!
So, I was using PROC PRINT in SAS EG (output using the default Excel report output options), and I noticed that it was printing each BY Variable on a separate tab, which is *not* what I want it to do (waaaaaaaay too many tabs). I thought it required a PAGEBY statement for this kind of behavior?
Anyway, is there any way that I can have my report sectioned out by my BY Variable, but have the entire report appear on one tab?
FYI, I also tried this with an explicit ODS Excel statement to see if that made a difference, just in case there was a weird option hiding in the SAS EG default that I wasn't aware of and it came out the same.
Here's the PROC PRINT code. As you can see, it's pretty simple.
proc print data=dataerrorname noobs;
by tk_ois_establish;
run;
Whew, that worked. I set the SHEET_INTERVAL="NONE" in the ODS Excel statement, and that did it. Must have had a different default than I realized. Thanks!
@TashaChapWUSS wrote:
Whew, that worked. I set the SHEET_INTERVAL="NONE" in the ODS Excel statement, and that did it. Must have had a different default than I realized. Thanks!
The default for Sheet_interval is "table". Since each of your by values creates a different table, at least as far as ODS output is concerned, each went to a separate sheet.
You would see different behavior if you ran Proc Univariate or some other procedure with multiple tables.
Then the BYGROUP option keeps all the tables of a single by value on a sheet.
Another option value to consider would be PROC to keep each procedure output on a single tab.
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.