<?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 Re: Style for line statement in Compute before ExcelXP in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Style-for-line-statement-in-Compute-before-ExcelXP/m-p/27043#M4314</link>
    <description>Hi:&lt;BR /&gt;
  This issue has come up before&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=50109쎽" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=50109쎽&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  And I modified your code sample below to illustrate the issue. Compare the HTML output (MSOFFICE2K) with the XML output (ExcelXP)  -- you can see that the background change is honored by Excel when the HTML file is opened; and NOT honored by Excel when the XML file is opened.&lt;BR /&gt;
&lt;BR /&gt;
  You can do some changes in a style template -- but basically, some overrides are just not honored by Excel when you use TAGSETS.EXCELXP -- I believe it is a limitation of how styles are defined/used in the XML.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods msoffice2k file='c:\temp\test1_mso.xls' style=sasweb;&lt;BR /&gt;
ods tagsets.excelXP file='c:\temp\test1_xp.xls' style=sasweb&lt;BR /&gt;
    options(absolute_column_width="10");&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
                                     &lt;BR /&gt;
proc report data=sashelp.class(obs=3) nowd&lt;BR /&gt;
     style(lines)={background=cyan font_size=18pt};&lt;BR /&gt;
title '1) background will work in HTML (MSOFFICE2K) but not ExcelXP)';&lt;BR /&gt;
column name age height weight sex;&lt;BR /&gt;
compute before / style={just=l protectspecialchars=off background=yellow font_size=14pt}; &lt;BR /&gt;
text1 = "fontsize should be 14pt background color is yellow in HTML only";&lt;BR /&gt;
line text1 $150.; &lt;BR /&gt;
endcomp; &lt;BR /&gt;
compute after;&lt;BR /&gt;
   text2 = 'This is a line with a cyan (default) background in HTML only';&lt;BR /&gt;
   line text2 $150.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                                                          &lt;BR /&gt;
title; footnote;&lt;BR /&gt;
** 2) Change the template NoteContent style element;&lt;BR /&gt;
ods path work.tmp(update) sashelp.tmplmst(read);&lt;BR /&gt;
                                      &lt;BR /&gt;
proc template;&lt;BR /&gt;
  define style styles.linecolor;&lt;BR /&gt;
  parent=styles.journal;&lt;BR /&gt;
  class NoteContent /&lt;BR /&gt;
    foreground=black&lt;BR /&gt;
    background=pink&lt;BR /&gt;
    font_weight=bold&lt;BR /&gt;
    font_size=14pt;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                                    &lt;BR /&gt;
ods msoffice2k file='c:\temp\test2_mso.xls' style=styles.linecolor;&lt;BR /&gt;
ods tagsets.excelXP file='c:\temp\test2_xp.xls' style=styles.linecolor&lt;BR /&gt;
    options(absolute_column_width="10");&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
                             &lt;BR /&gt;
proc report data=sashelp.class(obs=3) nowd;&lt;BR /&gt;
title '2) use a custom style template';&lt;BR /&gt;
column name age height weight sex;&lt;BR /&gt;
compute before / style={just=l protectspecialchars=off background=yellow font_size=14pt}; &lt;BR /&gt;
text1 = "fontsize should be 14pt background color yellow overrides style in HTML";&lt;BR /&gt;
line text1 $150.; &lt;BR /&gt;
endcomp; &lt;BR /&gt;
compute after;&lt;BR /&gt;
   text2 = 'This is a line using the style template color';&lt;BR /&gt;
   line text2 $150.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Fri, 11 Mar 2011 02:50:27 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2011-03-11T02:50:27Z</dc:date>
    <item>
      <title>Style for line statement in Compute before ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Style-for-line-statement-in-Compute-before-ExcelXP/m-p/27042#M4313</link>
      <description>I am trying to get line statement of font size of 14 or bigger and background of yellow or some color, in the compute before statement.&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2, most recent XP tagset, &lt;BR /&gt;
&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
ods tagsets.excelXP file='c:\temp\test.xls' style=sasweb;&lt;BR /&gt;
  ods escapechar='^';&lt;BR /&gt;
                &lt;BR /&gt;
  proc report data=sashelp.class(obs=3) nowd;&lt;BR /&gt;
    column name age height weight sex;&lt;BR /&gt;
    compute before / style={just=l protectspecialchars=off};  &lt;BR /&gt;
      text1 = "^{style[font_size=14pt color=blue background = yellow]&lt;BR /&gt;
                    fontsize should be 14pt background color is yellow}";&lt;BR /&gt;
      line text1 $; &lt;BR /&gt;
    endcomp; &lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Thu, 10 Mar 2011 22:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Style-for-line-statement-in-Compute-before-ExcelXP/m-p/27042#M4313</guid>
      <dc:creator>nj_sas</dc:creator>
      <dc:date>2011-03-10T22:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Style for line statement in Compute before ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Style-for-line-statement-in-Compute-before-ExcelXP/m-p/27043#M4314</link>
      <description>Hi:&lt;BR /&gt;
  This issue has come up before&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=50109쎽" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=50109쎽&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  And I modified your code sample below to illustrate the issue. Compare the HTML output (MSOFFICE2K) with the XML output (ExcelXP)  -- you can see that the background change is honored by Excel when the HTML file is opened; and NOT honored by Excel when the XML file is opened.&lt;BR /&gt;
&lt;BR /&gt;
  You can do some changes in a style template -- but basically, some overrides are just not honored by Excel when you use TAGSETS.EXCELXP -- I believe it is a limitation of how styles are defined/used in the XML.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
title; footnote;&lt;BR /&gt;
ods msoffice2k file='c:\temp\test1_mso.xls' style=sasweb;&lt;BR /&gt;
ods tagsets.excelXP file='c:\temp\test1_xp.xls' style=sasweb&lt;BR /&gt;
    options(absolute_column_width="10");&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
                                     &lt;BR /&gt;
proc report data=sashelp.class(obs=3) nowd&lt;BR /&gt;
     style(lines)={background=cyan font_size=18pt};&lt;BR /&gt;
title '1) background will work in HTML (MSOFFICE2K) but not ExcelXP)';&lt;BR /&gt;
column name age height weight sex;&lt;BR /&gt;
compute before / style={just=l protectspecialchars=off background=yellow font_size=14pt}; &lt;BR /&gt;
text1 = "fontsize should be 14pt background color is yellow in HTML only";&lt;BR /&gt;
line text1 $150.; &lt;BR /&gt;
endcomp; &lt;BR /&gt;
compute after;&lt;BR /&gt;
   text2 = 'This is a line with a cyan (default) background in HTML only';&lt;BR /&gt;
   line text2 $150.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
                                                          &lt;BR /&gt;
title; footnote;&lt;BR /&gt;
** 2) Change the template NoteContent style element;&lt;BR /&gt;
ods path work.tmp(update) sashelp.tmplmst(read);&lt;BR /&gt;
                                      &lt;BR /&gt;
proc template;&lt;BR /&gt;
  define style styles.linecolor;&lt;BR /&gt;
  parent=styles.journal;&lt;BR /&gt;
  class NoteContent /&lt;BR /&gt;
    foreground=black&lt;BR /&gt;
    background=pink&lt;BR /&gt;
    font_weight=bold&lt;BR /&gt;
    font_size=14pt;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                                    &lt;BR /&gt;
ods msoffice2k file='c:\temp\test2_mso.xls' style=styles.linecolor;&lt;BR /&gt;
ods tagsets.excelXP file='c:\temp\test2_xp.xls' style=styles.linecolor&lt;BR /&gt;
    options(absolute_column_width="10");&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
                             &lt;BR /&gt;
proc report data=sashelp.class(obs=3) nowd;&lt;BR /&gt;
title '2) use a custom style template';&lt;BR /&gt;
column name age height weight sex;&lt;BR /&gt;
compute before / style={just=l protectspecialchars=off background=yellow font_size=14pt}; &lt;BR /&gt;
text1 = "fontsize should be 14pt background color yellow overrides style in HTML";&lt;BR /&gt;
line text1 $150.; &lt;BR /&gt;
endcomp; &lt;BR /&gt;
compute after;&lt;BR /&gt;
   text2 = 'This is a line using the style template color';&lt;BR /&gt;
   line text2 $150.;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 11 Mar 2011 02:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Style-for-line-statement-in-Compute-before-ExcelXP/m-p/27043#M4314</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-03-11T02:50:27Z</dc:date>
    </item>
  </channel>
</rss>

