BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Doug____
Pyrite | Level 9

When building a listing report, ODS is causing text variables to wrap where some spaces are. I used the TAGATTR to remove the wrapping, but then the spaces disappear in some spots in the text variables giving the appearance of names that are run together. They do not appear this way in the dataset. Suggestions as to a workaround?

 

    ods excel file="aaa.xlsx"  options(SHEET_NAME='Recap' autofilter = 'All' embedded_titles='Yes'

    absolute_column_width='20,8,30,30,15,14,14,14,14,14,14,14,14,14') style = htmlblue;

 

Title "YTD Recap for the Period Ending  &Rpt_AS_OF";

Title2 "Summary Report as of &Rpt_Date";

 

proc report data = recap2 nowd contents = ' '  ;

column     name

code

market

area

PD_CM_PTS

CA_CM_PTS

FIN

S1_CM_PTS

S2_CM_PTS

CR NARR

COV

NUM_POL

ZZZ;

    define name /  "Name"   style={tagattr='wrap:No'};

    define code /  "Code"  ;

    define Market / "Market" format = $mkt.  order = data style={tagattr='wrap:No'} ;

    define area / "Area" format = $area.  order = data style={tagattr='wrap:No'} ;

    define CR/  'CR' format = f8.2 ;

    define CA_CM_PTS / 'CC ' format = f8.2 ;

    define PD_CM_PTS / 'PD' format = f8.2 ;

    define S1_CM_PTS / 'S1' format = f8.2 ;

    define S2_CM_PTS / 'S2' format = f8.2 ;

    define FIN / 'Fin.' format = f8.2 ;

    define NARR / 'Narr.' format = f8.2 ;

    define NUM_COV / 'Cov' format = f8.2 ;

    define NUM_POL / 'Pol' format = f8.2 ;

    define ZZZ  /'Overall' format = f8.3 ;

run;

ODS excel CLOSE;

 

NOTE: There were 158 observations read from the data set WORK.RECAP2.
NOTE: PROCEDURE REPORT used (Total process time):
real time 0.59 seconds
cpu time 0.56 seconds

 

NOTE: Writing EXCEL file: \aaa.xlsx

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

No sure if it work, Try another style.

 

style={tagattr='wrap:No'  asis=on } ;

View solution in original post

2 REPLIES 2
Ksharp
Super User

No sure if it work, Try another style.

 

style={tagattr='wrap:No'  asis=on } ;

Doug____
Pyrite | Level 9

That worked! I haven't used asis for quite some time...

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2979 views
  • 0 likes
  • 2 in conversation