The SAS Output Delivery System and reporting techniques

excel file open error using "ods tagsets.excelxp style=sansprinter"

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

excel file open error using "ods tagsets.excelxp style=sansprinter"

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;

Attachment

Accepted Solutions
Solution
‎01-07-2013 03:23 AM
New Contributor
Posts: 3

Re: excel file open error using "ods tagsets.excelxp style=sansprinter"

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.

View solution in original post


All Replies
SAS Super FREQ
Posts: 8,720

Re: excel file open error using "ods tagsets.excelxp style=sansprinter"

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

New Contributor
Posts: 3

Re: excel file open error using "ods tagsets.excelxp style=sansprinter"

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.

Solution
‎01-07-2013 03:23 AM
New Contributor
Posts: 3

Re: excel file open error using "ods tagsets.excelxp style=sansprinter"

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.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 1011 views
  • 3 likes
  • 2 in conversation