BookmarkSubscribeRSS Feed
Hart
Calcite | Level 5
I am outputting data from SAS to Excel. I would like to superscript the "1" in my put line, but am having problems. below is my data step.

data _null_;
set tablex;

file tabley;
put col1 '09'x col2 '09'x col3 '09'x col4 '09'x col5 '09'x col6 '09'x ;

file foota;
put "1The lists twelve......percentages";

I have tried the /{super} functions to no avail
run;
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
I don't believe that your form of the DATA step will create the superscript, even with the ESCAPECHAR+{super 1} specification. For one thing, you are bypassing ODS with your code and the {super} function is designed to work with ODS destinations, not with the LISTING destination.

However, you can use ESCAPECHAR+{super} in a footnote statement. And, if you use FILE PRINT ODS, or ODS HTML or ODS TAGSETS.EXCELXP, you can get an "in spreadsheet" footnote with a superscript 1. Either of these methods works for me in SAS 9.2.

cynthia
[pre]

ods tagsets.excelxp file='c:\temp\table_w_footxp.xml'
options(embedded_footnotes='yes') style=minimal;
ods html file='c:\temp\table_w_footht.xls' style=minimal;

ods escapechar='^';

footnote "^{super 1}The footnote uses a superscript.";
title '1) Compare ODS HTML and ExcelXP';
proc print data=sashelp.class(obs=4);
run;
ods _all_ close;

ods html file='c:\temp\table_w_footdt.xls' style=minimal;
ods escapechar='^';
data _null_;
footnote "^{super 1}The footnote uses a superscript.";
title '2) Use DATA Step and FILE PRINT ODS';

set sashelp.class(obs=4);
file print ods;
put _ods_;
run;
ods html close;
[/pre]
Hart
Calcite | Level 5
Thanks! worked great

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1163 views
  • 0 likes
  • 2 in conversation