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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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
  • 2 replies
  • 657 views
  • 0 likes
  • 2 in conversation