BookmarkSubscribeRSS Feed
johnc_sas
SAS Employee
Hi All,

I've attached a bit of code to use with ExcelXP. The first table output uses a bold italic font as expected, but when I add a superscript to the title, theformatting is removed. Any ideas why, or can you suggest an alternative to get the superscript in the title.

ods tagsets.excelxp options(embedded_titles='yes' embedded_footnotes='yes')
file="c:\temp\excelxp.xml" style= styles.journal;
ods escapechar='^';

proc tabulate data=sashelp.class;
title "Normal Title with bold fond";
class age sex;
table age='Age',
sex*n='' n='Total'*all='';
run;

proc tabulate data=sashelp.class;
title "Title with superscript^{super 1} - normal format. Why?";
class age sex;
table age='Age',
sex*n='' n='Total'*all='';
run;
ods tagsets.excelxp close;

many thanks
John
2 REPLIES 2
johnc_sas
SAS Employee
Just quick bump... I've raised this with support, as I guess it's a bug. However, maybe's come across it and knows a workaournd?

thanks
John
johnc_sas
SAS Employee
Hi All,

To update you (in case you were wondering :-)), you can get past this by using using the escapechar to reformat the title text. You may need to tweak the style to match your template again, but the superscript is effively changing the style of the title.

^S={font_weight=bold}

e.g - title "^S={font_weight=bold}Title with superscript^{super 1} - normal format. Why?";

However, the superscript has another negative affect, as it makes the row height for the title way too large (with versions of ExcelXP 1.116 and above).

I had to use the ROW_HEIGHTS option to speicify the title height to stop the unexpected behaviour caused by the superscript.

The ROW_HEIGHTS options had a further negative affect, because the height of the title for subseqeunt reports wasn't high enough (it diables auto fit), so I had to repeat this statement and tweak the heights before and after any time a superscript was used.

So it's workaround city, but hopefully later versions of the tagset will sort this.

John

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1980 views
  • 0 likes
  • 1 in conversation