<?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: color formats in Excel formats in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/color-formats-in-Excel-formats/m-p/21826#M4704</link>
    <description>here is a quick example that shows how proc print can define color to be used in foreground, background and dynamic based on the value of the cell (although it is data cells for which dynamic background color is derived).[pre]ods _all_ close ;&lt;BR /&gt;
ods tagsets.excelxp file='demo.xml'(title='test1') style= default ;&lt;BR /&gt;
ods tagsets.excelxp  options( sheet_name='col1' )  ;&lt;BR /&gt;
proc format ;&lt;BR /&gt;
   value ages 0-9 ='gray'&lt;BR /&gt;
             10-12='green'&lt;BR /&gt;
             13-14='yellow' &lt;BR /&gt;
             15-16='orange' other='white' ;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data= sashelp.class ;&lt;BR /&gt;
 id name /style(head)=[background=blue foreground = white] ;&lt;BR /&gt;
var  sex /style(head)=[                foreground = gray ] ;&lt;BR /&gt;
var  age /style(head)=[background=orange ]&lt;BR /&gt;
          style(data)=[font_weight=bold background=ages.] ;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close ;&lt;BR /&gt;
dm 'winexecfile "demo.xml" ' ;&lt;BR /&gt;
ods listing ;[/pre]Hope you'll find it helpful. &lt;BR /&gt;
For better guidance, look into the examples and notes for using ods tagsets.excelxp at &lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/&lt;/A&gt;  .&lt;BR /&gt;
 &lt;BR /&gt;
peterC

sheet_name not sheetname    was edited by: Peter.C</description>
    <pubDate>Fri, 14 May 2010 12:34:07 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2010-05-14T12:34:07Z</dc:date>
    <item>
      <title>color formats in Excel formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/color-formats-in-Excel-formats/m-p/21825#M4703</link>
      <description>i want to export files to excel with certain color formats on the headings.&lt;BR /&gt;
&lt;BR /&gt;
how can i do this?</description>
      <pubDate>Fri, 14 May 2010 07:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/color-formats-in-Excel-formats/m-p/21825#M4703</guid>
      <dc:creator>Jackie_Stanbank</dc:creator>
      <dc:date>2010-05-14T07:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: color formats in Excel formats</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/color-formats-in-Excel-formats/m-p/21826#M4704</link>
      <description>here is a quick example that shows how proc print can define color to be used in foreground, background and dynamic based on the value of the cell (although it is data cells for which dynamic background color is derived).[pre]ods _all_ close ;&lt;BR /&gt;
ods tagsets.excelxp file='demo.xml'(title='test1') style= default ;&lt;BR /&gt;
ods tagsets.excelxp  options( sheet_name='col1' )  ;&lt;BR /&gt;
proc format ;&lt;BR /&gt;
   value ages 0-9 ='gray'&lt;BR /&gt;
             10-12='green'&lt;BR /&gt;
             13-14='yellow' &lt;BR /&gt;
             15-16='orange' other='white' ;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data= sashelp.class ;&lt;BR /&gt;
 id name /style(head)=[background=blue foreground = white] ;&lt;BR /&gt;
var  sex /style(head)=[                foreground = gray ] ;&lt;BR /&gt;
var  age /style(head)=[background=orange ]&lt;BR /&gt;
          style(data)=[font_weight=bold background=ages.] ;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close ;&lt;BR /&gt;
dm 'winexecfile "demo.xml" ' ;&lt;BR /&gt;
ods listing ;[/pre]Hope you'll find it helpful. &lt;BR /&gt;
For better guidance, look into the examples and notes for using ods tagsets.excelxp at &lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/&lt;/A&gt;  .&lt;BR /&gt;
 &lt;BR /&gt;
peterC

sheet_name not sheetname    was edited by: Peter.C</description>
      <pubDate>Fri, 14 May 2010 12:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/color-formats-in-Excel-formats/m-p/21826#M4704</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-05-14T12:34:07Z</dc:date>
    </item>
  </channel>
</rss>

