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.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 1679 views
  • 0 likes
  • 3 in conversation