BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
snip
Obsidian | Level 7
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?

 

 

 

snip_0-1696259234506.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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?

 

 

 

snip_0-1696259234506.png

 


 

View solution in original post

2 REPLIES 2
ballardw
Super User

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?

 

 

 

snip_0-1696259234506.png

 


 

snip
Obsidian | Level 7
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

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 366 views
  • 0 likes
  • 2 in conversation