BookmarkSubscribeRSS Feed
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

I have tow questions about PROC REPORT:

 

1. My SAS code :

 

I need computed column with Cellwidth wide enough to hold % with certain length, otherwise will miss value or empty, the following code no errors but would not working either.

   

My Code as following:

 

define ConfigRework_Percent/COMPUTED 'ConfigRework_Percent' FORMAT=percent10.2 style=[tagattr="format:#,###.00%"] style(column)=[cellwidth=1.4in];

  compute ConfigRework_Percent;

     ConfigRework_Percent=_c19_/_c12_;

endcomp;

 

 

 

3 REPLIES 3
error_prone
Barite | Level 11

You are creating an excel-file? Are you using tagset.excelxp or excel?

 

Please post code using {i} or running-man-icon to preserve formatting.

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

Yes , ods excel.xlsx file.

 

Original: FORMAT=percent10.2 style=[tagattr="format:#,###.00%"];

 

Change to ?: FORMAT=percent10.2 style={[tagattr="format:#,###.00%"](column)=[cellwidth=1.2in]}

;

error_prone
Barite | Level 11

Back in the old days column-width could be specified in the ods-statement, not sure if ods excel still has that option. I can't test your code, because you have not provided test-data and the complete proc report code.

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 16. 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
  • 3 replies
  • 816 views
  • 0 likes
  • 2 in conversation