<?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: ODS to Excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-to-Excel/m-p/62751#M7394</link>
    <description>Hi:&lt;BR /&gt;
  You could try one of the following destinations instead of ODS HTML:&lt;BR /&gt;
1) ODS HTML3 (HTML 3.2 compliant tags)&lt;BR /&gt;
2) ODS MSOFFICE2K (Microsoft-compliant HTML tags)&lt;BR /&gt;
3) ODS TAGSETS.EXCELXP (Microsoft-compliant Spreadsheet Markup XML tags)&lt;BR /&gt;
 &lt;BR /&gt;
  The fact is that Microsoft does not like to render HTML 4.01 tags, which is the type of HTML tag that ODS HTML creates by default. Microsoft had an issue with the W3C recommendation for HTML4 and so it created a Microsoft flavor of HTML.&lt;BR /&gt;
 &lt;BR /&gt;
  The code below worked for me.&lt;BR /&gt;
&lt;BR /&gt;
  Also, I'm not sure why you're using STYLESHEET= with STYLE= unless you explicitly want an external CSS file to put on a web server. If you DO want a CSS file to put on the web server, then you should consider redoing your invocation. With your form of syntax (with &amp;amp;THEPATH) in the FILE= and STYLESHEET= options, the following LINK tag (incorrect) gets built:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;link rel="stylesheet" href="c:\temp\test.css"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
...which would be wrong because you should avoid physical file refs in an HREF attribute. &lt;BR /&gt;
&lt;BR /&gt;
My suggested syntax results in the following LINK tags being built (relative HREFs):&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;link rel="stylesheet" href="test.css"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
              &lt;BR /&gt;
...which is a relative HREF and as long as you move the HTML file and the CSS file together, the LINK will not be broken.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods path work.testtemp(update)&lt;BR /&gt;
         sasuser.templat(read)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
                              &lt;BR /&gt;
proc template;&lt;BR /&gt;
  define style styles.mystyle;&lt;BR /&gt;
    parent = styles.sasweb;&lt;BR /&gt;
    style Header from Header / &lt;BR /&gt;
      foreground=yellow&lt;BR /&gt;
      background=red ;&lt;BR /&gt;
  end; &lt;BR /&gt;
run;&lt;BR /&gt;
                                    &lt;BR /&gt;
%let thepath = c:\temp;    &lt;BR /&gt;
                                                &lt;BR /&gt;
ods html3  path= "&amp;amp;thepath" (url=none)&lt;BR /&gt;
          file="test_ht3.xls" &lt;BR /&gt;
          stylesheet="test_ht3.css"&lt;BR /&gt;
          style=styles.mystyle;&lt;BR /&gt;
                &lt;BR /&gt;
ods msoffice2k path= "&amp;amp;thepath" (url=none)&lt;BR /&gt;
          file="test_mso.xls" &lt;BR /&gt;
          stylesheet="test_mso.css"&lt;BR /&gt;
          style=styles.mystyle;&lt;BR /&gt;
                             &lt;BR /&gt;
ods tagsets.excelxp path= "&amp;amp;thepath" (url=none)&lt;BR /&gt;
          file="test_xp.xls" &lt;BR /&gt;
          style=styles.mystyle;&lt;BR /&gt;
                                 &lt;BR /&gt;
proc print data=sashelp.class noobs;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Mon, 24 Nov 2008 18:15:19 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2008-11-24T18:15:19Z</dc:date>
    <item>
      <title>ODS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-to-Excel/m-p/62750#M7393</link>
      <description>Is it possible to format the column header row using proc template with ods html?&lt;BR /&gt;
&lt;BR /&gt;
Here's some code that's NOT working (!) -- in the sense that it's not picking up the style Header in mystyle.&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define style styles.mystyle /store=sasuser.templat;&lt;BR /&gt;
  parent = styles.default;&lt;BR /&gt;
  style Header from Header / 					&lt;BR /&gt;
    foreground=yellow&lt;BR /&gt;
    background=red ;&lt;BR /&gt;
  end; &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods html &lt;BR /&gt;
  file="&amp;amp;thepath.\test.xls" &lt;BR /&gt;
  stylesheet="&amp;amp;thepath.\test.css"&lt;BR /&gt;
  style=styles.mystyle;&lt;BR /&gt;
&lt;BR /&gt;
  proc print data=class noobs;&lt;BR /&gt;
  run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Mon, 24 Nov 2008 15:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-to-Excel/m-p/62750#M7393</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-11-24T15:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: ODS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-to-Excel/m-p/62751#M7394</link>
      <description>Hi:&lt;BR /&gt;
  You could try one of the following destinations instead of ODS HTML:&lt;BR /&gt;
1) ODS HTML3 (HTML 3.2 compliant tags)&lt;BR /&gt;
2) ODS MSOFFICE2K (Microsoft-compliant HTML tags)&lt;BR /&gt;
3) ODS TAGSETS.EXCELXP (Microsoft-compliant Spreadsheet Markup XML tags)&lt;BR /&gt;
 &lt;BR /&gt;
  The fact is that Microsoft does not like to render HTML 4.01 tags, which is the type of HTML tag that ODS HTML creates by default. Microsoft had an issue with the W3C recommendation for HTML4 and so it created a Microsoft flavor of HTML.&lt;BR /&gt;
 &lt;BR /&gt;
  The code below worked for me.&lt;BR /&gt;
&lt;BR /&gt;
  Also, I'm not sure why you're using STYLESHEET= with STYLE= unless you explicitly want an external CSS file to put on a web server. If you DO want a CSS file to put on the web server, then you should consider redoing your invocation. With your form of syntax (with &amp;amp;THEPATH) in the FILE= and STYLESHEET= options, the following LINK tag (incorrect) gets built:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;link rel="stylesheet" href="c:\temp\test.css"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
...which would be wrong because you should avoid physical file refs in an HREF attribute. &lt;BR /&gt;
&lt;BR /&gt;
My suggested syntax results in the following LINK tags being built (relative HREFs):&lt;BR /&gt;
[pre]&lt;BR /&gt;
&amp;lt;link rel="stylesheet" href="test.css"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
              &lt;BR /&gt;
...which is a relative HREF and as long as you move the HTML file and the CSS file together, the LINK will not be broken.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods path work.testtemp(update)&lt;BR /&gt;
         sasuser.templat(read)&lt;BR /&gt;
         sashelp.tmplmst(read);&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
                              &lt;BR /&gt;
proc template;&lt;BR /&gt;
  define style styles.mystyle;&lt;BR /&gt;
    parent = styles.sasweb;&lt;BR /&gt;
    style Header from Header / &lt;BR /&gt;
      foreground=yellow&lt;BR /&gt;
      background=red ;&lt;BR /&gt;
  end; &lt;BR /&gt;
run;&lt;BR /&gt;
                                    &lt;BR /&gt;
%let thepath = c:\temp;    &lt;BR /&gt;
                                                &lt;BR /&gt;
ods html3  path= "&amp;amp;thepath" (url=none)&lt;BR /&gt;
          file="test_ht3.xls" &lt;BR /&gt;
          stylesheet="test_ht3.css"&lt;BR /&gt;
          style=styles.mystyle;&lt;BR /&gt;
                &lt;BR /&gt;
ods msoffice2k path= "&amp;amp;thepath" (url=none)&lt;BR /&gt;
          file="test_mso.xls" &lt;BR /&gt;
          stylesheet="test_mso.css"&lt;BR /&gt;
          style=styles.mystyle;&lt;BR /&gt;
                             &lt;BR /&gt;
ods tagsets.excelxp path= "&amp;amp;thepath" (url=none)&lt;BR /&gt;
          file="test_xp.xls" &lt;BR /&gt;
          style=styles.mystyle;&lt;BR /&gt;
                                 &lt;BR /&gt;
proc print data=sashelp.class noobs;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 24 Nov 2008 18:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-to-Excel/m-p/62751#M7394</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-11-24T18:15:19Z</dc:date>
    </item>
  </channel>
</rss>

