BookmarkSubscribeRSS Feed
VikrantSawatkar
Obsidian | Level 7

Hi All,

 

I have a dataset in which one particular column has the values like below

 

 1.jpg


and I want to generate an excel report in which these values from the said column should look like below. 

 

2.jpg


Could you please help me here. Many thanks in advance.

 

Regards,

Vikrant Sawatkar

6 REPLIES 6
Reeza
Super User

Flyover text is text that shows up when you hover over the cell, ie Excel Comments. Is that what you're trying to modify here or the value in the cells?

 

I'm not understanding your subject with how you've phrased the question. 

 

If you're modifying values in the cell, see the answers here:

https://communities.sas.com/t5/SAS-Text-and-Content-Analytics/Creating-a-carriage-return/m-p/340125/...

VikrantSawatkar
Obsidian | Level 7

Hi,

 

Sorry for the confusion.

 

I want to modify the values in the cells. So that when the report is gets created, the values are displayed as per the screenshot above.

 

I am using SAS 9.2.

 

Reeza
Super User

Ok, did the solution in the link not work for you?

 

You put the '0d0a'x (see below) in the location where you want a carriage return. When you export to Excel it should resolve as the carriage return. You're likely exporting to an XLS file so how you export is different but I suspect everything else is the same. If this does not work, post your code, log and a screenshot of your results.

'0d0a'x

 

Ksharp
Super User

Use ~n as your return characters.

Firstly, change your text into as :

 

This......follow ~n

(1)................. ~n

(2)...................~n

 

 

Then, output it into a excel file.

 

ods escapechar='~';

ods excel file='......';

proc report......

ods excel close;

Reeza
Super User

@Ksharp SAS 9.2 definitely does not have ODS Excel.

Ksharp
Super User

Opps, then try   

ods tagsets.excelxp ............

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 6 replies
  • 1271 views
  • 1 like
  • 3 in conversation