<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic inline style in excel output? ODS tagset in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65705#M7641</link>
    <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
I use inline style in my html output. I do this by adding a data field to my data in the data step:&lt;BR /&gt;
&lt;BR /&gt;
ods escapechar = '~';&lt;BR /&gt;
&lt;BR /&gt;
data work.newfile;&lt;BR /&gt;
  set myoldfile;&lt;BR /&gt;
  newfield  = "~S={font_weight=bold}blablabla~S={}~1n~S={font_size=-1}more text";&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
After that I run a simple proc report.&lt;BR /&gt;
&lt;BR /&gt;
So I have inline style for a font_weight, line break and font_size.&lt;BR /&gt;
Can I do that in excel as well? The above code does not work in excel output.&lt;BR /&gt;
&lt;BR /&gt;
Best wishes&lt;BR /&gt;
Eva</description>
    <pubDate>Tue, 25 Jan 2011 14:03:49 GMT</pubDate>
    <dc:creator>Eva</dc:creator>
    <dc:date>2011-01-25T14:03:49Z</dc:date>
    <item>
      <title>inline style in excel output? ODS tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65705#M7641</link>
      <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
I use inline style in my html output. I do this by adding a data field to my data in the data step:&lt;BR /&gt;
&lt;BR /&gt;
ods escapechar = '~';&lt;BR /&gt;
&lt;BR /&gt;
data work.newfile;&lt;BR /&gt;
  set myoldfile;&lt;BR /&gt;
  newfield  = "~S={font_weight=bold}blablabla~S={}~1n~S={font_size=-1}more text";&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
After that I run a simple proc report.&lt;BR /&gt;
&lt;BR /&gt;
So I have inline style for a font_weight, line break and font_size.&lt;BR /&gt;
Can I do that in excel as well? The above code does not work in excel output.&lt;BR /&gt;
&lt;BR /&gt;
Best wishes&lt;BR /&gt;
Eva</description>
      <pubDate>Tue, 25 Jan 2011 14:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65705#M7641</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2011-01-25T14:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: inline style in excel output? ODS tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65706#M7642</link>
      <description>Hi:&lt;BR /&gt;
  I am not sure that you can use negative numbers to specify font size. The numbers you specify when you use the font_size attribute can be a relative font size (such as an HTML font size of 1 through 7) or a PT size or other units of measure, as identified here (where it explicitly says that the dimension for font-size must be a non-negative number):&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002972093.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002972093.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  When I tried this, then the second line of "more text" was in an 8pt font.&lt;BR /&gt;
[pre]&lt;BR /&gt;
newfield = "~S={font_weight=bold}blablabla~S={}~1n~S={font_size=8pt}more text";&lt;BR /&gt;
[/pre]&lt;BR /&gt;
I used the MSOFFICE2K destination which creates "Microsoft friendly" HTML tag for my HTML file. I find that Excel is happiest opening this type of HTML.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 25 Jan 2011 17:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65706#M7642</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-01-25T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: inline style in excel output? ODS tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65707#M7643</link>
      <description>Dear Cythia,&lt;BR /&gt;
&lt;BR /&gt;
The font_size=-1 works perfect with ods html. That's why I used it. I first did my report for HTML and now I have to add excel as output and try to fit in as much as I can what I did for the html output.&lt;BR /&gt;
&lt;BR /&gt;
For Excel I used the tagset.excelxp&lt;BR /&gt;
Here everything I needed worked except the inline style I mentioned in this thread.&lt;BR /&gt;
&lt;BR /&gt;
I now tried your suggestion with tagset.msoffice2k and the inline style now works just as in html. Even the font_size=-1 which indeed is relative value.&lt;BR /&gt;
&lt;BR /&gt;
With this tagset everything works I used with the excelxp tagset except the ods options column_width nor frozen_headers = 'yes' nor sheet_name = 'xy'&lt;BR /&gt;
&lt;BR /&gt;
Do I have to choose now or is there a way to get everything? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Best wishes&lt;BR /&gt;
Eva</description>
      <pubDate>Wed, 26 Jan 2011 08:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65707#M7643</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2011-01-26T08:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: inline style in excel output? ODS tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65708#M7644</link>
      <description>Hi: &lt;BR /&gt;
  since the doc says that font size must be a non-negative number, I am baffled by how the '-1' even works. That would be a question for Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
  TAGSETS.EXCELXP has different sub-options than other destinations. For example, TAGSETS.EXCELXP has frozen_headers and sheet_name sub-options that are just not built in to the "regular" HTML-based ODS destinations like ODS HTML or ODS HTML3. That's because TAGSETS.EXCELXP creates Microsoft Office 2003 Spreadsheet Markup Language XML tags and NOT HTML tags. So sub-options that work with TAGSETS.EXCELXP will not work with ODS HTML, ODS HTML3 or ODS MSOFFICE2K. &lt;BR /&gt;
 &lt;BR /&gt;
  There is, however, a new HTML-based destination, TAGSETS.MSOFFICE2K_X, that may offer you some solution. The information about it is described here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
The exciting thing about TAGSETS.MSOFFICE2K_X is that it adds sub-options similar to the TAGSETS.EXCELXP suboptions except to an HTML-based destination. For example, there are extensive print setup sub-options and (the good news for you) a SHEET_NAME sub-option. It looks like there might be a FROZEN_HEADERS sub-option too. So maybe you can have everything you want.&lt;BR /&gt;
&lt;BR /&gt;
  Or, it may be easier to change your font_size from a negative number to a point size and keep using TAGSETS.EXCELXP with the existing sub-options. The point size should work for ODS HTML instead of the -1.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 26 Jan 2011 21:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65708#M7644</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-01-26T21:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: inline style in excel output? ODS tagset</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65709#M7645</link>
      <description>Dear Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Unfortunately, there is no tagset that has everything so the programmer has to choose which fits best.&lt;BR /&gt;
&lt;BR /&gt;
The problem with the excelxp tagset was not only the font size -1 but that it didn't display anything I did with the inline style (no bold font no line break e.g.).&lt;BR /&gt;
&lt;BR /&gt;
When I use the msoffice2k tagset I don't have the options sheet_name and frozen_headers.&lt;BR /&gt;
&lt;BR /&gt;
When I use the msoffice2k_x tagset I can't use any line break. I had e.g. two title statements. Which resulted in a code with &lt;TT&gt;&lt;BR /&gt;&lt;/TT&gt;. As SAS didn't use  I got the error in excel that the &lt;BR /&gt; didn't have a closing tag.&lt;BR /&gt;
&lt;BR /&gt;
So no tagset with everything. But now I have a selection and try to choose the best tagset for my needs.&lt;BR /&gt;
&lt;BR /&gt;
Thanx a lot for the idscussion!&lt;BR /&gt;
Eva

Message was edited by: Eva</description>
      <pubDate>Mon, 31 Jan 2011 07:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/inline-style-in-excel-output-ODS-tagset/m-p/65709#M7645</guid>
      <dc:creator>Eva</dc:creator>
      <dc:date>2011-01-31T07:22:39Z</dc:date>
    </item>
  </channel>
</rss>

