Hello
I use ods tagsets.ExcelXp to export sas data set to XML sheet .
The null values appear with dot (.) symbol in the XML file.
What is the way to replace dot values(.) with empty values?
data ttbl;
input ID group $ Y;
cards;
1 a .
2 a .
3 a 30
4 a 40
5 b .
6 b 25
7 b 35.85
8 c 50
9 c 60
10 c .
;
run;
ods _all_ close;/*To prevent print on screen*/
ods tagsets.ExcelXp
File ='Ex3b.xml'
path="/My path/";
proc print data=ttbl noobs label;
run;
ods tagsets.ExcelXp close;
ods listing;
Okay, I found the answer. Need to use options missing=' ' statement.
Options missing = ' ';
ods _all_ close;/*To prevent print on screen*/
ods tagsets.ExcelXp
File ='Ex3c.xml'
path="/My path/";
proc print data=ttbl noobs label;
run;
ods tagsets.ExcelXp close;
ods listing;
Option missing=.;/*go back to the default*/
Okay, I found the answer. Need to use options missing=' ' statement.
Options missing = ' ';
ods _all_ close;/*To prevent print on screen*/
ods tagsets.ExcelXp
File ='Ex3c.xml'
path="/My path/";
proc print data=ttbl noobs label;
run;
ods tagsets.ExcelXp close;
ods listing;
Option missing=.;/*go back to the default*/
Since you are using Proc Print you could also use formats for each variable that display space instead of . for missing values, or even "NULL" if desired.
Why are you using PROC PRINT if you don't want a print out?
libname out xlsx "/My path/Ex3b.xlsx";
proc copy inlib=work outlib=out;
select ttbl;
run;
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!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: