DATA Step, Macro, Functions and more

Proc Export dbms=xlsx SAS 9.4

Reply
Occasional Learner
Posts: 1

Proc Export dbms=xlsx SAS 9.4

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

Super User
Posts: 19,770

Re: Proc Export dbms=xlsx SAS 9.4

Posted in reply to arulrajan
Just a guess, have you tried call missing() instead?

data test;
set test;
if b='r' then call missing(b);
run;
Super User
Posts: 11,343

Re: Proc Export dbms=xlsx SAS 9.4

Posted in reply to arulrajan

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

Ask a Question
Discussion stats
  • 2 replies
  • 178 views
  • 0 likes
  • 3 in conversation