The SAS Output Delivery System and reporting techniques

ExcelXP - Superscript changing my titles font style

Reply
SAS Employee
Posts: 8

ExcelXP - Superscript changing my titles font style

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
SAS Employee
Posts: 8

Re: ExcelXP - Superscript changing my titles font style

Posted in reply to johnc_sas
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
SAS Employee
Posts: 8

Re: ExcelXP - Superscript changing my titles font style

Posted in reply to johnc_sas
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
Ask a Question
Discussion stats
  • 2 replies
  • 458 views
  • 0 likes
  • 1 in conversation