BookmarkSubscribeRSS Feed
arulrajan
Calcite | Level 5

I ran this below code in SAS 9.4 on Linux

 

data test;
input a $ b $;
datalines;
q s
t r
;
run;

data test;
set test;
if b='r' then b='';
run;

proc export data=test dbms=xlsx outfile='/data/com/test1.xlsx' replace;
run;

 

returns an xlsx with Non Printable Blank values. This is made sure with =ISBLANK function on the excel. The =ISBLANK of column 'b' is false for both observations. Whereas it should not be False for 2nd observation.

 

Please is there any way to correct this proc export dbms=xlsx option. I am not using pcfiles, as SAS 9.4 export to Linux does not need that but xlsx engine will be taking care of it.

 

Thank you very much for your help!

Arul

2 REPLIES 2
Reeza
Super User
Just a guess, have you tried call missing() instead?

data test;
set test;
if b='r' then call missing(b);
run;
ballardw
Super User

Or assign an actual space: ' ' instead of ''

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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