BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Shenglin
Calcite | Level 5

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;


Capture.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
Shenglin
Calcite | Level 5

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

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

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

Shenglin
Calcite | Level 5

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.

Shenglin
Calcite | Level 5

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.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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