The SAS Output Delivery System and reporting techniques

Is it possible to get superscripts in ODS EXCEL output?

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

Is it possible to get superscripts in ODS EXCEL output?

Hi

Does anyone know how to get superscripts coming out in XLSX files produced using ODS EXCEL?

 

They come out fine using ODS tagsets.excelxp (but we'd like to move to ODS EXCEL as it does certain other things better)

 

I run the following code (using SAS 9.4 maintenance release 3):

 

ods escapechar='^';

ods excel file='c:\temp\test.xlsx'

options(sheet_name="test" embedded_titles="yes" embedded_footnotes="yes" TITLE_FOOTNOTE_NOBREAK="yes");

proc tabulate data=sashelp.class;

var height weight;

class age sex;

table age=' ',

mean=' '*sex='Gender Average ^{super(a)}'*(height weight)

mean='Overall Avg'*(height weight) /

box={label='Age'};

run;

ods excel close;

 

The requested superscripted (a) appears as such in the results (sasreport) window.

 

But in the XLSX file, the (a) doesn't appear at all, with or without superscript.

 


Accepted Solutions
Solution
‎10-30-2016 05:59 PM
Super Contributor
Posts: 394

Re: Is it possible to get superscripts in ODS EXCEL output?

Add a blank between super and (a)

 

mean=' '*sex='Gender Average ^{super (a)}'*(height weight)

I've reported the problem to Tech Support.

View solution in original post


All Replies
Super User
Posts: 9,865

Re: Is it possible to get superscripts in ODS EXCEL output?

Could you use 

'Gender Average ^{unicode  23456 }'

 

find the right number by yourself . Google or check Word's symbol table.

Contributor
Posts: 35

Re: Is it possible to get superscripts in ODS EXCEL output?

Thanks for the suggestion.

 

Unicodes DO seem to work in ODS Excel output.

 

But from what I can see there is a unicode for subscripted a

but not for superscripted a.

 

We need to be able to superscript other letters (not just those with unicodes), and for them to be in parentheses.

 

The unicode parentheses look a bit weird (especially when bold) and probably wouldn't satisfy our publications team, who are used to the "usual" looking superscripting that we can get in ODS tagsets.EXCELXP.

 

Hopefully there is an easier way.

 

But thanks again for the response.

Solution
‎10-30-2016 05:59 PM
Super Contributor
Posts: 394

Re: Is it possible to get superscripts in ODS EXCEL output?

Add a blank between super and (a)

 

mean=' '*sex='Gender Average ^{super (a)}'*(height weight)

I've reported the problem to Tech Support.

Contributor
Posts: 35

Re: Is it possible to get superscripts in ODS EXCEL output?

Ah, I should have tried adding a blank in myself.

 

Thanks Tim.

Much appreciated.

 

 

☑ This topic is solved.

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

Discussion stats
  • 4 replies
  • 510 views
  • 0 likes
  • 3 in conversation