The SAS Output Delivery System and reporting techniques

Having problems with inline formatting footnote with italic font

Reply
Occasional Contributor
Posts: 6

Having problems with inline formatting footnote with italic font

Here is the code I am using for my inline italicizing for a footnote in preparation for a proc print using ods to an xml file for use in excel.

footnote j=left height=8pt "Note: Denominators for computing rates are from the California Department of Finance, \{style [font_style=slant color=red] E-2 California County Population Estimates and Components of Change.}";

The color=red works, which I don't care about. I was just trying to make sure I had syntax correct. I have tried font-weight=italic, font_style=italic, just italic and I can't seem to get the later half of this footnote to italicize. It prints red, but not italic.

Any solution would be greatly appreciated.

Super Contributor
Posts: 394

Re: Having problems with inline formatting footnote with italic font

ods escapechar='\';

title 'Example for footnote';

footnote j=left height=8pt "Note: Denominators for computing rates are from the California Department of Finance, \{style [fontstyle=italic color=red] E-2 California County Population Estimates and Components of Change.}";

proc print data=sashelp.class(obs=5);

run;

FONTSTYLE=

Super Contributor
Posts: 394

Re: Having problems with inline formatting footnote with italic font

Going back to the original post, OP says "using ods to an xml file for use in excel". I interpret this to mean the ODS TAGSETS.EXCELXP destination.

I have since learned that FONTSTYLE=ITALIC doesn't work with Excelxp. Excelxp's support for inline formatting is limited to foreground color, font, font weight, and text decoration.

Sorry if my previous post caused any confusion.

Occasional Contributor
Posts: 6

Re: Having problems with inline formatting footnote with italic font

Thanks for help and subsequent clarification. Appreciated.

Super User
Super User
Posts: 7,716

Re: Having problems with inline formatting footnote with italic font

Hi,

I would suggest you switch to the HTML engine.  The reason is that you are actually writing out XML text data, which Excel then interprets and I don't believe it will parse tags within the actual data, so you wouldn't be able to change part of a cell's font.  You could change the whole cell with tagattr={"italic=1"} or something along those lines (I can never remember off the top of my head).  Although, why not switch output destinations to a reporting format, PDF or RTF for instance rather than Excel output.

Occasional Contributor
Posts: 6

Re: Having problems with inline formatting footnote with italic font

I check out the HTML engine.

Ask a Question
Discussion stats
  • 5 replies
  • 712 views
  • 0 likes
  • 3 in conversation