BookmarkSubscribeRSS Feed
RRGanapathy
Calcite | Level 5

Dear SAS Community,

 

In continuation of the topic discussed in the thread below, is there anyway to display the period(dot) as empty numeric cell in Proc Report without creating any additional space. 

 

https://communities.sas.com/t5/SAS-Programming/Is-there-a-way-to-suppress-missing-value-indicators-i...

 

Thanks,

RR

4 REPLIES 4
PaigeMiller
Diamond | Level 26

@RRGanapathy wrote:

 

In continuation of the topic discussed in the thread below, is there anyway to display the period(dot) as empty numeric cell in Proc Report without creating any additional space. 


What does "without creating any additional space" mean?

--
Paige Miller
RRGanapathy
Calcite | Level 5

Hi Paige Miller,

 

I tried with the setting, option missing='', it replaces the dot with blank space(infact the dot is replaced) in excel but then in the excel report, I see 8 spaces as it is the default space allocated. I would like this to be an empty cell with no allocated space.

 

You ll see something like this, when you copy the excel cell in a notepad.

 

RRGanapathy_0-1650962138204.png

 

PaigeMiller
Diamond | Level 26

Your screen capture provides no context, as we can't see cells that have actual data in them for comparison.

 

Show us what you want, and show us what you are getting, so we can see more of the picture.

--
Paige Miller
Kurt_Bremser
Super User

You can COMPUTE a variable:

data have;
input x;
datalines;
1
.
;

ods excel file="~/miss.xlsx";

proc report data=have;
column x _x;
define x / noprint;
define _x / computed right;
compute _x / character;
  if _c1_ = .
  then _x = "";
  else _x = put(_c1_,8.);
endcomp;
run;

ods excel close;

Cell A3 will be empty, while A2 can still be used in calculations.

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
  • 4 replies
  • 1237 views
  • 0 likes
  • 3 in conversation