- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 06-26-2009 06:25 AM
(866 views)
Hi,
I would like to bring to your notice a pecularity in SAS ODS when fetching data from Dataset to excel in Handeling of Special character "%" :
I tried:
data new;
input a$ ;
cards;
as
1%1g
1231
%%
qq
%
00
1%1g
aa
1%
ww
1%1
;
run;
ODS HTML FILE="C:\new.xls" ;
PROC PRINT DATA=new; RUN;
ODS HTML close;
But I see the observations: 2, 4 and 8 are not handeled properly.
the excel sheet has the below output
The SAS System
Obs a
1 as
2 11g
3 1231
4 %
5 qq
6 %
7 00
8 11g
9 aa
10 1%
11 ww
12 1%1
I hav used SAS 9.1.3
I would like to bring to your notice a pecularity in SAS ODS when fetching data from Dataset to excel in Handeling of Special character "%" :
I tried:
data new;
input a$ ;
cards;
as
1%1g
1231
%%
%
00
1%1g
aa
1%
ww
1%1
;
run;
ODS HTML FILE="C:\new.xls" ;
PROC PRINT DATA=new; RUN;
ODS HTML close;
But I see the observations: 2, 4 and 8 are not handeled properly.
the excel sheet has the below output
The SAS System
Obs a
1 as
2 11g
3 1231
4 %
5 qq
6 %
7 00
8 11g
9 aa
10 1%
11 ww
12 1%1
I hav used SAS 9.1.3
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you inspect the SAS-generated file (not using Excel), you will see that the data rows are generated correct and complete. The issue is with how Excel is interpreting those data rows and the imbedded "%" character under specific circumstances.
Investigate techniques for influencing how Excel is to interpret the SAS-generated file.
I found a related technical/conference paper at the SAS support http://support.sas.com/ website using the SEARCH facility:
Using ODS to Generate Excel Files
Chevell Parker
http://support.sas.com/rnd/base/ods/templateFAQ/Excel1.pdf
Scott Barry
SBBWorks, Inc.
Investigate techniques for influencing how Excel is to interpret the SAS-generated file.
I found a related technical/conference paper at the SAS support http://support.sas.com/ website using the SEARCH facility:
Using ODS to Generate Excel Files
Chevell Parker
http://support.sas.com/rnd/base/ods/templateFAQ/Excel1.pdf
Scott Barry
SBBWorks, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Scott,
for sharing the info you had,
I now have the exact explanation for this, which is documented in the SAS Note below. This problem is fixed in SAS 9.2. and I was using 9.1
http://support.sas.com/kb/17/862.html
for sharing the info you had,
I now have the exact explanation for this, which is documented in the SAS Note below. This problem is fixed in SAS 9.2. and I was using 9.1
http://support.sas.com/kb/17/862.html