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.
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;
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.
Thanks for help and subsequent clarification. Appreciated.
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.
I check out the HTML engine.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.