SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Special characters do not display correctly in Excel

Reply
Contributor
Posts: 53

Special characters do not display correctly in Excel

I am using SAS 9.1.3 SP4 and Microsoft Office 2007 with the SAS Add-In to Microsoft Office. I have a stored process that uses PROC TABULATE to output a summary table. When I run the STP in the IDP the results are exactly as expected. The problem is when I run the stored process in Excel.

If I use SAS Report as the default for Format under Options > Results then values that contain an ampersand, e.g., Arts & Humanities, are displayed as Arts & Humanities. I found a note on SAS Support that recommend using HTML as the default results format in Excel. However, when I change to HTML I do get the ampersand displayed correctly but now I lose leading and trailing zeroes in the program code values.

I have tried using the style={htmlstyle="mso-number-format:\@"} in the CLASS statement in PROC TABULATE to display the codes as text but that didn't help other than to change the header background. I have also tried adding a new class to the CSS file and used style={htmlclass='ClassName'} but that didn't work either. I have tried creating an mso-number-format:00\.0000 but it didn't use that either. Since the values are character, I am unable to use a PICTURE format in SAS code.

I have searched this forum, the Stored Process Forum, the ODS and Base Reporting Forum, and general SAS Support but can't seem to find anything that will help.

Any assistance will be greatly appreciated!

Message was edited by: UCFAngel I was able to get the htmlstyle="mso-number-format:\@" to work. I was putting it on the CLASS statement for the class variable but it needed to be in the TABLE statement.

CIP={STYLE(CLASSLEV)={BACKGROUND=#FFFFFF FOREGROUND=#000000 HTMLSTYLE="mso-number-format:\@"}}

I am looking forward to the version of Add-In for 9.2. Hopefully, all these bugs will be worked out.


Message was edited by: UCFAngel
Ask a Question
Discussion stats
  • 0 replies
  • 173 views
  • 0 likes
  • 1 in conversation