The SAS Output Delivery System and reporting techniques

ODS from :: Dataset to excel and Handeling of "%"

Reply
N/A
Posts: 0

ODS from :: Dataset to excel and Handeling of "%"

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
Super Contributor
Super Contributor
Posts: 3,174

Re: ODS from :: Dataset to excel and Handeling of "%"

Posted in reply to deleted_user
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.
N/A
Posts: 0

Re: ODS from :: Dataset to excel and Handeling of "%"

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
Ask a Question
Discussion stats
  • 2 replies
  • 92 views
  • 0 likes
  • 2 in conversation