BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Diana_K
Calcite | Level 5

Hello,

 

I am new with both ODS and proc reports, and I have a variable with the label as "Sample #" but I can't get the # to come through the excel report as well.

I've attached a picture of the attributes of my variables, the proc report program as well as the excel output.

 

Thank you!

ods.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Diana_K and welcome to the SAS Support Communities!

 

With the option SPLIT = '#' of the PROC REPORT statement you told SAS to interpret the "#" as a marker where to put a line break: A column header of the form "First#Second" would be written as

First
Second

 

So, just remove the SPLIT= option (to use the default split character "/") or specify a different split character (e.g., split = '~') which does not occur as text in your column headers.

 

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @Diana_K and welcome to the SAS Support Communities!

 

With the option SPLIT = '#' of the PROC REPORT statement you told SAS to interpret the "#" as a marker where to put a line break: A column header of the form "First#Second" would be written as

First
Second

 

So, just remove the SPLIT= option (to use the default split character "/") or specify a different split character (e.g., split = '~') which does not occur as text in your column headers.

 

Diana_K
Calcite | Level 5

Aaaaaah thank you, yes, I feel silly now.

I've picked up this program from someone else, indeed changing the # into something else solved the issue.

 

Much appreciated!

 

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
  • 586 views
  • 1 like
  • 2 in conversation