<?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 How to color ENTIRE ROW(s) (created via ODS Excel procedure) based on the value(s) of ROW(S) in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793199#M25597</link>
    <description>&lt;P&gt;Hi Experts,&lt;BR /&gt;Scenario:&lt;BR /&gt;Dataset(decision) contains following info:&lt;BR /&gt;&lt;BR /&gt;Name&amp;nbsp; &amp;nbsp; &amp;nbsp; Score&amp;nbsp; &amp;nbsp; &amp;nbsp;Grade&amp;nbsp; &amp;nbsp; &amp;nbsp;DecisionMemo&lt;BR /&gt;Michael&amp;nbsp; &amp;nbsp;80&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Internship&lt;BR /&gt;Michelle&amp;nbsp; 77&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mentoring&lt;BR /&gt;Andy&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;99&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fulbright &lt;BR /&gt;Nancy&amp;nbsp; &amp;nbsp; 73&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mentoring&lt;BR /&gt;Candy&amp;nbsp; &amp;nbsp;72&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Coaching&lt;/P&gt;
&lt;P&gt;1.The entire row(s) must be highlighted with a RED background color if the Grade is C(C+, C-), YELLOW if the grade is B(B+, B-), and GREEN if Grade is A(A+, A-).&lt;BR /&gt;2.The entire ROW must be highlighted with a PURPLE background color if the Name begins with C(andy), Grade is C- and DecisionMemo is 'Coaching'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what I have now:&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;ods excel file = 'c:\myreport\decision.xlsx';&lt;BR /&gt;options (&lt;BR /&gt;sheet_name='Memo'&lt;BR /&gt;protect_worksheet='on'&lt;BR /&gt;autofilter='all'&lt;BR /&gt;frozen_headers='on'&lt;BR /&gt;orientation='landscape'&lt;BR /&gt;screen_resolution_scale_factor='display-scale-factor'&lt;BR /&gt;);&lt;BR /&gt;proc print data = decision label noobs; run;&lt;BR /&gt;style(header)= {just=c foreground=black};&lt;BR /&gt;var name&amp;nbsp; / style(data)={just=l} style(header)={background=light green};&lt;/P&gt;
&lt;P&gt;var score / style(data)={just=l} style(header)={background=light green};&lt;BR /&gt;var grade / style(data)={just=l} style(header)={background= light brown}; &lt;BR /&gt;var decisionmemo / style(data)={just=c} style(header)={background= yellow};&lt;BR /&gt;ods excel close;&lt;/P&gt;
&lt;P&gt;Any relevant links or code (so kind of you, thank you very much!) is greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jan 2022 19:55:12 GMT</pubDate>
    <dc:creator>inquistive</dc:creator>
    <dc:date>2022-01-28T19:55:12Z</dc:date>
    <item>
      <title>How to color ENTIRE ROW(s) (created via ODS Excel procedure) based on the value(s) of ROW(S)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793199#M25597</link>
      <description>&lt;P&gt;Hi Experts,&lt;BR /&gt;Scenario:&lt;BR /&gt;Dataset(decision) contains following info:&lt;BR /&gt;&lt;BR /&gt;Name&amp;nbsp; &amp;nbsp; &amp;nbsp; Score&amp;nbsp; &amp;nbsp; &amp;nbsp;Grade&amp;nbsp; &amp;nbsp; &amp;nbsp;DecisionMemo&lt;BR /&gt;Michael&amp;nbsp; &amp;nbsp;80&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Internship&lt;BR /&gt;Michelle&amp;nbsp; 77&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mentoring&lt;BR /&gt;Andy&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;99&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fulbright &lt;BR /&gt;Nancy&amp;nbsp; &amp;nbsp; 73&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mentoring&lt;BR /&gt;Candy&amp;nbsp; &amp;nbsp;72&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Coaching&lt;/P&gt;
&lt;P&gt;1.The entire row(s) must be highlighted with a RED background color if the Grade is C(C+, C-), YELLOW if the grade is B(B+, B-), and GREEN if Grade is A(A+, A-).&lt;BR /&gt;2.The entire ROW must be highlighted with a PURPLE background color if the Name begins with C(andy), Grade is C- and DecisionMemo is 'Coaching'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what I have now:&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;ods excel file = 'c:\myreport\decision.xlsx';&lt;BR /&gt;options (&lt;BR /&gt;sheet_name='Memo'&lt;BR /&gt;protect_worksheet='on'&lt;BR /&gt;autofilter='all'&lt;BR /&gt;frozen_headers='on'&lt;BR /&gt;orientation='landscape'&lt;BR /&gt;screen_resolution_scale_factor='display-scale-factor'&lt;BR /&gt;);&lt;BR /&gt;proc print data = decision label noobs; run;&lt;BR /&gt;style(header)= {just=c foreground=black};&lt;BR /&gt;var name&amp;nbsp; / style(data)={just=l} style(header)={background=light green};&lt;/P&gt;
&lt;P&gt;var score / style(data)={just=l} style(header)={background=light green};&lt;BR /&gt;var grade / style(data)={just=l} style(header)={background= light brown}; &lt;BR /&gt;var decisionmemo / style(data)={just=c} style(header)={background= yellow};&lt;BR /&gt;ods excel close;&lt;/P&gt;
&lt;P&gt;Any relevant links or code (so kind of you, thank you very much!) is greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 19:55:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793199#M25597</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2022-01-28T19:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to color ENTIRE ROW(s) (created via ODS Excel procedure) based on the value(s) of ROW(S)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793406#M25602</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You will need to switch to PROC REPORT if you want to highlight an entire row. For example, consider this output created with ODS EXCEL and PROC REPORT, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1643581344645.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67979i31F5FFFC8294BCDD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1643581344645.png" alt="Cynthia_sas_0-1643581344645.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are a few different ways to code the COMPUTE block. I prefer to test a variable on the report row at the end of the row, after all the variables have been placed on the row. PROC REPORT moves from left to right as it is placing items on the report row, so it is easier to do a test on the last item on a row if you want to change the style of the entire row or you want to touch multiple columns on the same row. I make a helper variable called SVAR that holds the style override for each row based on the VALUE of AGE. Note that I defined AGE as a display usage item. If I had taken the default usage of ANALYSIS for AGE, then the IF statement would have needed to change the reference in the IF to AGE.SUM -- but in this case, I was not doing any calculations with AGE or summary lines, so DISPLAY usage allowed me to simplify the IF statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; PROC PRINT will let you change the color of one variable at a time, but you can't change the color of a whole row in PROC PRINT -- that is one of the examples where PROC REPORT shines.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jan 2022 22:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793406#M25602</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-01-30T22:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to color ENTIRE ROW(s) (created via ODS Excel procedure) based on the value(s) of ROW(S)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793563#M25603</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/38890"&gt;@cynthia&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;Thanks for the quick tip. It seems to work but ignores the following options:&amp;nbsp;&lt;BR /&gt;options (&lt;BR /&gt;sheet_name='Memo'&lt;BR /&gt;protect_worksheet='on'&lt;BR /&gt;autofilter='all'&lt;BR /&gt;frozen_headers='on'&lt;BR /&gt;orientation='landscape'&lt;BR /&gt;screen_resolution_scale_factor='display-scale-factor'&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to keep these options in place?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 17:47:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793563#M25603</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2022-01-31T17:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to color ENTIRE ROW(s) (created via ODS Excel procedure) based on the value(s) of ROW(S)</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793570#M25604</link>
      <description>&lt;P&gt;You can use these options with PROC REPORT just as you tried earlier with PROC PRINT.&amp;nbsp;These are ODS EXCEL options, not PROC PRINT options.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 18:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-color-ENTIRE-ROW-s-created-via-ODS-Excel-procedure-based/m-p/793570#M25604</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-31T18:40:10Z</dc:date>
    </item>
  </channel>
</rss>

