<?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: Why does not my Proc template style on ODS Excel ? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/345045#M18212</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;</description>
    <pubDate>Tue, 28 Mar 2017 15:55:29 GMT</pubDate>
    <dc:creator>bala_pa</dc:creator>
    <dc:date>2017-03-28T15:55:29Z</dc:date>
    <item>
      <title>Why does not my Proc template style on ODS Excel ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/343478#M18179</link>
      <description>&lt;P&gt;Hello SAS Form,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using a template style to create same report in xlsx file using ods excel and xml using tagsets. &amp;nbsp;The template works on xml and not on xlsx. For example: The font, borders are as per style in xml format whereas xlsx uses some default of its own. Can someone help me resolve the issue? Below is the sample code that I am working on. I am using SAS 9.4 M1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;define style customnew;&lt;BR /&gt;parent=Styles.Normal;&lt;/P&gt;&lt;P&gt;style header /&lt;BR /&gt;font_face='Microsoft Sans Serif'&lt;BR /&gt;fontsize=11pt&lt;BR /&gt;color=black&lt;BR /&gt;fontweight=bold&lt;BR /&gt;textalign=center&lt;BR /&gt;verticalalign=middle&lt;BR /&gt;backgroundcolor=lightblue&lt;BR /&gt;;&lt;BR /&gt;style data /&lt;BR /&gt;font_face='Microsoft Sans Serif'&lt;BR /&gt;fontsize=10pt&lt;BR /&gt;borderbottomcolor=black&lt;BR /&gt;&lt;BR /&gt;textalign=center&lt;BR /&gt;verticalalign=middle&lt;BR /&gt;;&lt;BR /&gt;style Table /&lt;BR /&gt;borderwidth = 3px&lt;BR /&gt;bordercolor=black&lt;BR /&gt;frame = box&lt;BR /&gt;rules = all&lt;BR /&gt;borderwidth = 1pt&lt;BR /&gt;bordertopcolor = black&lt;BR /&gt;borderbottomcolor = black&lt;BR /&gt;borderleftcolor = black&lt;BR /&gt;borderrightcolor = black&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;style Body /&lt;BR /&gt;topmargin = _undef_&lt;BR /&gt;bottommargin = _undef_&lt;BR /&gt;leftmargin = _undef_&lt;BR /&gt;rightmargin = _undef_&lt;BR /&gt;;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%let outputpath=C:\Users;&lt;/P&gt;&lt;P&gt;ods excel file="&amp;amp;outputpath.\class.xlsx" style=customnew;&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;BR /&gt;ods excel close;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp file="&amp;amp;outputpath.\class.xml" style=customnew;&lt;BR /&gt;proc print data=sashelp.class;&lt;BR /&gt;run;&lt;BR /&gt;ods tagsets.excelxp close;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 19:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/343478#M18179</guid>
      <dc:creator>bala_pa</dc:creator>
      <dc:date>2017-03-22T19:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why does not my Proc template style on ODS Excel ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/343541#M18182</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I used a slightly modified version of your template and added a very obvious change to the style header (pink and purple) so I could be sure that the style template was being used. I can verify that the style template is being used as you can see in the screen shots below. My template was almost the same as yours except I added an ODS PATH statement so I could control the location of the template and I added the style header section and I cleaned up the indention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If your issue is with the border lines, that is something of a sticking point with templates and Excel. Microsoft has one way to do borders and border lines and won't really respect what you specify here, easily.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; One way to verify that Excel does not respect border lines -- either presence or absence, take a look at the differing outputs created by this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html(id=1) file='c:\temp\output\class_jour.html' style=journal;
ods tagsets.excelxp(id=2) file='c:\temp\output\class_jour.xml' style=journal;
ods excel(id=3) file="&amp;amp;outputpath.\class_jour.xlsx" style=journal;
proc print data=sashelp.class;
run;
ods excel(id=3) close;
ods tagsets.excelxp(id=2) close;
ods html(id=1) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as you can see in the screen shot, the HTML file is lovely, with no interior table lines, as defined by the journal style. Compare that with the ODS EXCEL and ODS TAGSETS.EXCELXP outputs:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="try_journal.png" alt="try_journal.png" src="https://communities.sas.com/t5/image/serverpage/image-id/7911i0E6CE82BA58A1CB1/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run my version of your code, I do see the style is used for those elements and attributes that Excel respects. For example, it did use the MIcrosoft Sans Serif font and the sizes specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&lt;IMG title="template_used.png" alt="template_used.png" src="https://communities.sas.com/t5/image/serverpage/image-id/7912i72E30688B190638F/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 00:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/343541#M18182</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-23T00:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why does not my Proc template style on ODS Excel ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/344809#M18202</link>
      <description>&lt;P&gt;Hello Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;included the ODS path statement and also modified the Proc Template (FONT, its SIZE and HEADER Colors)to check&amp;nbsp;if it worked. Yes all the changed worked for .xml file whereas only the color and size options we applied to the xlsx format. You can see that the xlsx file does not use the MocroSoft Sans Serif font and borders. If this is an issue like you told earlier with MS Excel and templates, can you suggest me a suitable template style which I can make modifications and will still work with MS Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Bala&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7973i4C48E5B36CB4D74A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="2017-03-27_14-10-02.png" title="2017-03-27_14-10-02.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 21:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/344809#M18202</guid>
      <dc:creator>bala_pa</dc:creator>
      <dc:date>2017-03-27T21:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why does not my Proc template style on ODS Excel ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/344843#M18205</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; As I indicated in my posting, "If your issue is with the border lines, that is something of a sticking point with templates and Excel. Microsoft has one way to do borders and border lines and won't really respect what you specify here, easily." &lt;BR /&gt;&lt;BR /&gt; The code I and examples I posted illustrated that point .. the border lines work for RTF, PDF and HTML (or absence of border lines if you use the JOURNAL style) -- but they do NOT work with ODS EXCEL or ODS TAGSETS.EXCELXP. And, I am not sure that you can specify to turn on the border lines with a style template. This would be a question for Tech Support.&lt;BR /&gt;&lt;BR /&gt; I did see the Microsoft Sans Serif font used in my Excel output. If you replace all the occurences of Courier New with Microsoft Sans Serif in your template, you should see that font being used, assuming it is on your system. If your template font is not showing in Excel, then that, along with border lines is a question for Tech Support.&lt;BR /&gt; &lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 01:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/344843#M18205</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-28T01:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does not my Proc template style on ODS Excel ?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/345045#M18212</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bala&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 15:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-not-my-Proc-template-style-on-ODS-Excel/m-p/345045#M18212</guid>
      <dc:creator>bala_pa</dc:creator>
      <dc:date>2017-03-28T15:55:29Z</dc:date>
    </item>
  </channel>
</rss>

