BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ronein
Onyx | Level 15

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;
1 ACCEPTED SOLUTION

Accepted Solutions
Ronein
Onyx | Level 15

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*/

 

 

View solution in original post

3 REPLIES 3
Ronein
Onyx | Level 15

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*/

 

 

ballardw
Super User

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.

Tom
Super User Tom
Super User

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;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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