proc sort data=sashelp.class out=class ;by sex ;run; ods excel file='G:.....\class.xlsx' options(sheet_name = "#byval1"); proc report data=class; by sex; column sex height weight; define age / group; define height / mean; define weight / mean; rbreak before / summarize; run; ods excel close;
Good morning, I produce a report with proc report and the option sheet_name = "#byval1" to have my data on two tabs according to my group by. I do not want to have my group displayed in the report. how to do it please?
Set OPTIONS NOBYLINE prior to the report. Don't forget to turn it back on later.
proc sort data=sashelp.class out=class ;by sex ;run; options nobyline; ods excel file="&outpath.class.xlsx" options(sheet_name = "#byval1"); proc report data=class; by sex; column sex height weight; define age / group; define height / mean; define weight / mean; rbreak before / summarize; run; ods excel close; options byline;
Warning: your COLUMNS statement does not include the AGE variable so the report has issues.
@snip wrote:
proc sort data=sashelp.class out=class ;by sex ;run; ods excel file='G:.....\class.xlsx' options(sheet_name = "#byval1"); proc report data=class; by sex; column sex height weight; define age / group; define height / mean; define weight / mean; rbreak before / summarize; run; ods excel close;Good morning, I produce a report with proc report and the option sheet_name = "#byval1" to have my data on two tabs according to my group by. I do not want to have my group displayed in the report. how to do it please?
Set OPTIONS NOBYLINE prior to the report. Don't forget to turn it back on later.
proc sort data=sashelp.class out=class ;by sex ;run; options nobyline; ods excel file="&outpath.class.xlsx" options(sheet_name = "#byval1"); proc report data=class; by sex; column sex height weight; define age / group; define height / mean; define weight / mean; rbreak before / summarize; run; ods excel close; options byline;
Warning: your COLUMNS statement does not include the AGE variable so the report has issues.
@snip wrote:
proc sort data=sashelp.class out=class ;by sex ;run; ods excel file='G:.....\class.xlsx' options(sheet_name = "#byval1"); proc report data=class; by sex; column sex height weight; define age / group; define height / mean; define weight / mean; rbreak before / summarize; run; ods excel close;Good morning, I produce a report with proc report and the option sheet_name = "#byval1" to have my data on two tabs according to my group by. I do not want to have my group displayed in the report. how to do it please?
Thank you very much for your answer !!
the class table was just to be able to provide an example of what I want, it's not my real data
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.