ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
nitink26
Obsidian | Level 7

Hi,

 

I am running below code and its running without error.

 

ods excel file='C:\..\test.xlsx';
proc report data=SASHELP.DEMOGRAPHICS ;
run;
ods excel close;

 

Only issue I am facing with characters columns have long strings like with column E 

Snapshot below is the excel download-

nitink26_0-1681700422992.png

and if I wrap the text there will be no space between words highlighted in yellow.

 

Snapshot below after applying Wrap in Excel -

nitink26_1-1681700570893.png

 

Could you please help me to fix the issue? Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Before I try the TAGATTR approach, I will generally try the simple WIDTH= style override for the columns with issues. In this case, with my test of SASHELP.DEMOGRAPHICS, I could generate an Excel report file without wrapping by simply making the width adjustment, as shown below:

Cynthia_sas_0-1681779515924.png

 

  Hope this helps,

Cynthia

View solution in original post

4 REPLIES 4
Ksharp
Super User

Ksharp_0-1681731453723.png

 

nitink26
Obsidian | Level 7

Hi @Ksharp,

 

I tried your code but still it removes the spaces between the words.

Snapshot below-

nitink26_0-1681773494384.png

 

code - 

ods excel file='C:\Nitin\Work\testcolor.xlsx';
proc report data=SASHELP.DEMOGRAPHICS nowd style(column)={tagattr ='wrap:no'};
run;
ods excel close;

 

Cynthia_sas
SAS Super FREQ

Hi:

  Before I try the TAGATTR approach, I will generally try the simple WIDTH= style override for the columns with issues. In this case, with my test of SASHELP.DEMOGRAPHICS, I could generate an Excel report file without wrapping by simply making the width adjustment, as shown below:

Cynthia_sas_0-1681779515924.png

 

  Hope this helps,

Cynthia

nitink26
Obsidian | Level 7
Thanks Cynthia!

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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