<?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 SPAN color and borders in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-SPAN-color-and-borders/m-p/313772#M17382</link>
    <description>&lt;P&gt;Hi:&lt;BR /&gt; A few comments:&lt;BR /&gt;-- Note sure about what the "..." means. What you've posted only seems to show the green headers in your screen shot&lt;BR /&gt;-- You do not show HOW you are getting the output into Excel -- yes, you said you were using ODS EXCEL, but you didn't show the ODS code and any options/suboptions in effect&lt;BR /&gt;-- headline and headskip are meaningless for most ODS destinations -- they were designed for LISTING output only&lt;BR /&gt;-- you do not have any usages -- so I assume you are taking the default usage of ANALYSIS SUM for numeric variables and DISPLAY for character variables&lt;BR /&gt;--You did not post data so to run your code, people either need to make some fake data or imagine what a program change would do&lt;BR /&gt;-- hard to answer your question about borders because Excel is famous for not using borders, widths, decimal places, etc -- the SAS Style you specified on your ODS statement might have an impact -- for example style=htmlblue vs style=journal vs style=sasweb all produce different borderwidths and internal rules in a different way&lt;BR /&gt;--you can simplify your style overrides, for example, once you specify font and just in the PROC REPORT statement, you do not have to change it for the DEFINE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a comparison of what different styles do in ODS EXCEL, consider these outputs:&lt;/P&gt;
&lt;P&gt;STYLE=HTMLBLUE&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5973iD396337886B06CB0/image-size/original?v=v2&amp;amp;px=-1" alt="ods_excel_style_htmlblue.png" title="ods_excel_style_htmlblue.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;(at least there are border lines using STYLE=HTMLBLUE)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STYLE=JOURNAL&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5974iEC7D6906B9B93861/image-size/original?v=v2&amp;amp;px=-1" alt="ods_excel_style_journal.png" title="ods_excel_style_journal.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STYLE=SASWEB&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5975i7A3E190B319BD6A7/image-size/original?v=v2&amp;amp;px=-1" alt="ods_excel_style_sasweb.png" title="ods_excel_style_sasweb.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compared to output with ODS HTML and STYLE=HTMLBLUE using the same PROC REPORT code. Note how Borderwidth=5px changes for HTML, but did NOT change for ODS EXCEL:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5976i0A6A5916B641A277/image-size/original?v=v2&amp;amp;px=-1" alt="ods_html_htmlblue.png" title="ods_html_htmlblue.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;produced with this slightly changed data and program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let flow_beg=Something;
%let mo_report=November;

data class;
set sashelp.class;
unit='xxx';
run;

ods html(id=ht) file='c:\temp\ods_html_lb.html' style=htmlblue;
ods excel(id=1) file='c:\temp\lb1.xlsx' style=htmlblue;
ods excel(id=2) file='c:\temp\lb2.xlsx' style=journal;
ods excel (id=3) file='c:\temp\lb3.xlsx' style=sasweb;
proc report data=class (where=(sex="F")) nowd spanrows
style (column)={background=white just=center color=black font=("arial",7.5pt) bordercolor=black borderwidth=5px frame=box}
style (header)={background=white font_weight=bold just=center color=gray font=("arial",8.0pt) bordercolor=black borderwidth=5px frame=box};

columns UNIT ("PERCENT/AMBULATION/FOR/&amp;amp;Flow_Beg" name age height)
("ESTIMATED PERCENT AMBULATION FOR MONTH OF &amp;amp;MO_REPORT" sex age=b_age weight);

define UNIT/'Unit' style(header)={background=white color=black };
define name/"numerator" style(header)= {background=green  color=white };
define age/"denominator" style(header)={background=green  color=white };
define height/"% Compliance" 
             style(column)={tagattr='format:0%'} 
             style(header)={background=green  color=white };
define sex/"numerator " style(header)={background=green  color=white };
define b_age/"denominator" style(header)={background=green  color=white };
define weight/"% Compliance" 
             style(column)={tagattr='format:0%'} 
             style(header)={background=green color=white };
run; 
ods html(id=ht) close;
ods excel(id=3) close;
ods excel(id=2) close;
ods excel(id=1) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt;cynthia&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2016 13:54:23 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2016-11-23T13:54:23Z</dc:date>
    <item>
      <title>ODS SPAN color and borders</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-SPAN-color-and-borders/m-p/313296#M17380</link>
      <description>&lt;P&gt;Happy Thankgiving week all! &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a couple of small questions regarding output into Excel with ODS EXCEL. &amp;nbsp;I am running this on SAS 9.4 M3 on a linux system.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you look at the attached -I am attempting to simply change the background color of the top headers- &amp;nbsp;I can do this within the style command for the headers but then it does across the row-which I don't want- I would like to individually change those colors. I have attempted to insert style statements &amp;nbsp;into:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;("ESTIMATED PERCENT AMBULATION FOR MONTH OF &amp;amp;MO_REPORT" month_num b_denom mon_compliance) between the parentheses w/o success. &amp;nbsp;I can do this for the ODS PDF destination and that works though.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also when I use the code&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt; style (header)={background=white just=center color=gray font =("arial",8.0pt) bordercolor=black borderwidth=1 frame=box};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It works into the EG windoes environment but &amp;nbsp;does not render the black borders around cells in the ODS excel output. &amp;nbsp; Any advice on this?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Some snippet of code below.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Any assistance much appreciated.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lawrence&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc report data=dfrx.ms_stats_out (where=(fac_id= "xxx")) headline headskip nowd spanrows&lt;BR /&gt;style (column)={background=white just=center color=black font =("arial",7.5pt) bordercolor=black borderwidth=1 frame=box}&lt;BR /&gt;style (header)={background=white just=center color=gray font =("arial",8.0pt) bordercolor=black borderwidth=1 frame=box};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;columns UNIT ("PERCENT/AMBULATION/FOR/&amp;amp;Flow_Beg" numerator denom pct_compliance) &lt;BR /&gt; ("ESTIMATED PERCENT AMBULATION FOR MONTH OF &amp;amp;MO_REPORT" month_num b_denom mon_compliance);&lt;/P&gt;
&lt;P&gt;...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;define UNIT/'Unit' style (header)={background=white just=center color=black font =("arial",8.0pt)};&lt;BR /&gt;define pct_compliance/"% Compliance" style (header)={background=green just=center color=white font =("arial",8.0pt) bordercolor=black borderwidth=2};&lt;BR /&gt;define month_num/"Numerator " style (header)={background=green just=center color=white font =("arial",8.0pt)};&lt;BR /&gt;define b_denom/"Denominator" style (header)={background=green just=center color=white font =("arial",8.0pt)};&lt;BR /&gt;define mon_compliance/"% Compliance" style={tagattr='format:0%'} style (header)={background=green just=center color=white font =("arial",8.0pt)};&lt;BR /&gt;define Numerator/"Numerator" style (header)= {background=green just=center color=white font =("arial",8.0pt)};&lt;BR /&gt;define Denom/"Denominator" style(header)={background=green just=center color=white font =("arial",8.0pt)};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;run;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13163i2B607E93EBE55FCC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="ODS EXAMPLE.jpg" title="ODS EXAMPLE.jpg" /&gt;</description>
      <pubDate>Mon, 21 Nov 2016 22:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-SPAN-color-and-borders/m-p/313296#M17380</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2016-11-21T22:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: ODS SPAN color and borders</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-SPAN-color-and-borders/m-p/313772#M17382</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; A few comments:&lt;BR /&gt;-- Note sure about what the "..." means. What you've posted only seems to show the green headers in your screen shot&lt;BR /&gt;-- You do not show HOW you are getting the output into Excel -- yes, you said you were using ODS EXCEL, but you didn't show the ODS code and any options/suboptions in effect&lt;BR /&gt;-- headline and headskip are meaningless for most ODS destinations -- they were designed for LISTING output only&lt;BR /&gt;-- you do not have any usages -- so I assume you are taking the default usage of ANALYSIS SUM for numeric variables and DISPLAY for character variables&lt;BR /&gt;--You did not post data so to run your code, people either need to make some fake data or imagine what a program change would do&lt;BR /&gt;-- hard to answer your question about borders because Excel is famous for not using borders, widths, decimal places, etc -- the SAS Style you specified on your ODS statement might have an impact -- for example style=htmlblue vs style=journal vs style=sasweb all produce different borderwidths and internal rules in a different way&lt;BR /&gt;--you can simplify your style overrides, for example, once you specify font and just in the PROC REPORT statement, you do not have to change it for the DEFINE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a comparison of what different styles do in ODS EXCEL, consider these outputs:&lt;/P&gt;
&lt;P&gt;STYLE=HTMLBLUE&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5973iD396337886B06CB0/image-size/original?v=v2&amp;amp;px=-1" alt="ods_excel_style_htmlblue.png" title="ods_excel_style_htmlblue.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;(at least there are border lines using STYLE=HTMLBLUE)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STYLE=JOURNAL&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5974iEC7D6906B9B93861/image-size/original?v=v2&amp;amp;px=-1" alt="ods_excel_style_journal.png" title="ods_excel_style_journal.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;STYLE=SASWEB&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5975i7A3E190B319BD6A7/image-size/original?v=v2&amp;amp;px=-1" alt="ods_excel_style_sasweb.png" title="ods_excel_style_sasweb.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compared to output with ODS HTML and STYLE=HTMLBLUE using the same PROC REPORT code. Note how Borderwidth=5px changes for HTML, but did NOT change for ODS EXCEL:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5976i0A6A5916B641A277/image-size/original?v=v2&amp;amp;px=-1" alt="ods_html_htmlblue.png" title="ods_html_htmlblue.png" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;produced with this slightly changed data and program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let flow_beg=Something;
%let mo_report=November;

data class;
set sashelp.class;
unit='xxx';
run;

ods html(id=ht) file='c:\temp\ods_html_lb.html' style=htmlblue;
ods excel(id=1) file='c:\temp\lb1.xlsx' style=htmlblue;
ods excel(id=2) file='c:\temp\lb2.xlsx' style=journal;
ods excel (id=3) file='c:\temp\lb3.xlsx' style=sasweb;
proc report data=class (where=(sex="F")) nowd spanrows
style (column)={background=white just=center color=black font=("arial",7.5pt) bordercolor=black borderwidth=5px frame=box}
style (header)={background=white font_weight=bold just=center color=gray font=("arial",8.0pt) bordercolor=black borderwidth=5px frame=box};

columns UNIT ("PERCENT/AMBULATION/FOR/&amp;amp;Flow_Beg" name age height)
("ESTIMATED PERCENT AMBULATION FOR MONTH OF &amp;amp;MO_REPORT" sex age=b_age weight);

define UNIT/'Unit' style(header)={background=white color=black };
define name/"numerator" style(header)= {background=green  color=white };
define age/"denominator" style(header)={background=green  color=white };
define height/"% Compliance" 
             style(column)={tagattr='format:0%'} 
             style(header)={background=green  color=white };
define sex/"numerator " style(header)={background=green  color=white };
define b_age/"denominator" style(header)={background=green  color=white };
define weight/"% Compliance" 
             style(column)={tagattr='format:0%'} 
             style(header)={background=green color=white };
run; 
ods html(id=ht) close;
ods excel(id=3) close;
ods excel(id=2) close;
ods excel(id=1) close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt; &lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 13:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-SPAN-color-and-borders/m-p/313772#M17382</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-11-23T13:54:23Z</dc:date>
    </item>
  </channel>
</rss>

