Hi,
I am using excelxp to export a sas dataset to excel file in Unix SAS 9.2. But the excel file can not be opened with error saying style error.
See the attachment. Some of the contents are below.
XML ERROR in Style
REASON: Bad Value
FILE: C:\Users\<userid>\AppData\Local\Temp\scp49188\user1\<userid>\class.xls
GROUP: Style
TAG: Font
ATTRIB: FontName
VALUE: Albany AMT, Helvetica, sans-serif
I can run it correctly in the Unix SAS 9.1.3 and PC SAS 9.1.3 / 9.2. But error happen in Unix SAS 9.2.
And I try another style, such as 'printer', it works. So I am assuming it is due to the style 'sansprinter'.
Can someone help me out? Can excelxp support style 'sansprinter' in Unix SAS 9.2.
Thanks.
The code I use is:
ods listing close;
ods tagsets.excelxp file="class.xls" style=sansprinter;
proc print data=sashelp.class noobs;
run;
ods tagsets.excelxp close;
ods listing;
The problem is because in the Unix SAS 92 the style 'sansprinter' contain the font 'Sans-Serif'. This font is not compatible with MS excel file.
Refer to http://support.sas.com/kb/36/195.html for detail information and workaround.
Hi:
I do not have Unix available to test. When I run the code in SAS 9.3 on Windows, the output opens correctly in Microsoft Office. My suggestion would be that you work with Tech Support on this issue. They can test the code using the same operating system and version of SAS as you have.
cynthia
Hi Cynthia,
Thanks a lot for your answer. Yes, the result is correct in Windows SAS 9.2 in my side.
I will contact the Tech Support for this issue.
The problem is because in the Unix SAS 92 the style 'sansprinter' contain the font 'Sans-Serif'. This font is not compatible with MS excel file.
Refer to http://support.sas.com/kb/36/195.html for detail information and workaround.
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: