<?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: conditional formatting of rows through ODS Excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840524#M25980</link>
    <description>&lt;P&gt;Many of us will not download attachments, especially Excel files which can be a security threat. Please show us a screen capture of the issue in Excel, use the "Insert Photos" icon (do not attach files).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please show us the macro by copying the entire macro and pasting it into the window that appears when you click on the "little running man" icon.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2022 13:49:55 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-10-25T13:49:55Z</dc:date>
    <item>
      <title>conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840515#M25978</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm in the process of migrating a reporting table entirely to a SAS output through ODS excel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I have everything I previously had in the reporting layout that was done in excel, except for one thing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a macro that alters the borderline of a row based on the cell value of a certain column (I have attached an example of this).&amp;nbsp;&lt;/P&gt;&lt;P&gt;the report is pre-sorted, the macro just runs through the column and if it's the same value as the previous value (the one above in the sheet) the whole row is give a thin dotted bottomline. if not, there is a normal line (once again for the whole row of data).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already found how to de-activate the gridlines, and other layout stuff, but I have yet to find this one... any help much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 13:36:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840515#M25978</guid>
      <dc:creator>KoVa</dc:creator>
      <dc:date>2022-10-25T13:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840524#M25980</link>
      <description>&lt;P&gt;Many of us will not download attachments, especially Excel files which can be a security threat. Please show us a screen capture of the issue in Excel, use the "Insert Photos" icon (do not attach files).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please show us the macro by copying the entire macro and pasting it into the window that appears when you click on the "little running man" icon.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 13:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840524#M25980</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-25T13:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840564#M25981</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-25 152938.png" style="width: 568px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76562iD60A274D1AFB7FF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-10-25 152938.png" alt="Screenshot 2022-10-25 152938.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as requested here is a screenshot of an example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code I use to generate the report is pretty basic&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*create sheet with links to enrollment*/
ODS EXCEL FILE=&amp;amp;linkr style=htmlblue options(
frozen_headers="ON" autofilter = "1-9" row_heights="30,13,13,13,13,13,13" flow = "header, data" 
absolute_column_width = "18,27,12,12,56,10,21,21" 
sheet_name = "&amp;amp;namer"
) ;
 
PROC report DATA=rep_&amp;amp;campaign nowd;
columns col1	col2 col3 col4 col5 link;
define col1 /
     style(header)={just=center }
     style(column)={just=center};
define col2 /
     style(header)={just=center }
     style(column)={just=center};
compute col3;
 call define(_col_,'url',link);
 if substr(col2,1,1) = 'P' THEN CALL DEFINE(_col_, "style", "STYLE=[BACKGROUND=cxFFFF99 textdecoration=underline color=blue]");
 if substr(col2,1,1) = 'A' THEN CALL DEFINE(_col_, "style", "STYLE=[BACKGROUND=lightgreen textdecoration=underline color=blue]");
 if substr(col2,1,1) = 'R' THEN CALL DEFINE(_col_, "style", "STYLE=[BACKGROUND=lightred textdecoration=underline color=blue]");
endcomp;

define link / noprint;
RUN ;

 
ODS _all_ CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 14:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840564#M25981</guid>
      <dc:creator>KoVa</dc:creator>
      <dc:date>2022-10-25T14:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840566#M25982</link>
      <description>&lt;P&gt;Nothing matches your original description. You mentioned a macro, but you don't show a macro. The code you show changes colors, decoration and background colors, but the Excel screen capture shows none of that. Your Excel screen capture shows INFO1 through INFO5, but your code shows none of that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide screen captures and code that are consistent with each other and consistent with your original explanation.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 14:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840566#M25982</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-25T14:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840568#M25983</link>
      <description>since I cannot just past code here I just renamed columns to create 2 examples (yes with different headers and such), sorry.&lt;BR /&gt;Anyway, I think I have found what I was looking for by adding a column in a datastep first. should have searched a bit more, because I think I can use this:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Controlling-borders-in-PROC-REPORT-and-ODS-Excel/td-p/755418" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Controlling-borders-in-PROC-REPORT-and-ODS-Excel/td-p/755418&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Oct 2022 14:39:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840568#M25983</guid>
      <dc:creator>KoVa</dc:creator>
      <dc:date>2022-10-25T14:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840576#M25984</link>
      <description>HI, In addition to &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; suggestions, you have a variable called LINK that you are using to create a URL but we don't see that value on the report because you have LINK set to NOPRINT. Also, LINK is at the end of the report row, but you are trying to use it in the COMPUTE block for COL3, which should fail. In addition, based on the data you show, none of your IF statements would work because as far as I can tell, nothing in your COL2 variable has values of 'P', 'A' or 'R'.&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 25 Oct 2022 14:51:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840576#M25984</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-10-25T14:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: conditional formatting of rows through ODS Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840660#M25986</link>
      <description>thx but it's already solved, found the answer elsewhere on this forum. should have looked a bit more first &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 25 Oct 2022 19:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/conditional-formatting-of-rows-through-ODS-Excel/m-p/840660#M25986</guid>
      <dc:creator>KoVa</dc:creator>
      <dc:date>2022-10-25T19:13:12Z</dc:date>
    </item>
  </channel>
</rss>

