Date: Wed, 8 Jan 2003 18:11:42 -0500
Reply-To: Yu Guo <Yu.Guo@VERISPAN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Yu Guo <Yu.Guo@VERISPAN.COM>
Subject: Problem to export dataset to Excel file when having missing value
Hello,
I met a problem when I tried to export a dataset to Excel file
when having missing value. In the excel file, I suppose the missing
value should either occupied an empty cell or show '.' in the cell.
But in fact, the cell respected to the missing value just disappeared so
that
the data on the left side will shift one cell left. Below is an example for
this
problem. In test1.xls an empty cell is generated for the missing value,
while
in test2.xls, the missing value disappeared and data shift left for one
cell.
Does anybody know how to let it export missing data correctly to EXCEL file?
Thanks!
-Raymond
data test1;
input c1 c2 c3 c4 c5 c6;
cards;
1 . 3 4 5 6
11 12 13 14 15 16
run;
data test2;
input c1 c2 c3 c4 c5 c6;
cards;
1 2 . 3 5 6
11 12 13 14 15 16
run;
PROC EXPORT
DATA = test1
OUTFILE = "test1.xls"
DBMS = EXCEL
REPLACE;
run;
PROC EXPORT
DATA = test2
OUTFILE = "test2.xls"
DBMS = EXCEL
REPLACE;
run;
|