Help using Base SAS procedures

superscripting

Reply
Contributor
Posts: 22

superscripting

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;
SAS Super FREQ
Posts: 8,742

Re: superscripting

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]
Contributor
Posts: 22

Re: superscripting

Thanks! worked great
Ask a Question
Discussion stats
  • 2 replies
  • 106 views
  • 0 likes
  • 2 in conversation