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!

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1028 views
  • 1 like
  • 2 in conversation