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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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