<?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 Having problems with ODS Excel and dates and highlighting in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935233#M26641</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm have a problem with no highlighting in my results. I get results as expected (and yes, there is a 31Aug2022 in my dates) but nothing highlights. My code is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let asofdt = '31Aug2022'd;&lt;/P&gt;
&lt;P&gt;%let newfile = Newfile_data.xlsx;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods excel file = "&amp;amp;newfile." &lt;BR /&gt;options (Sheet_Name = 'Focus_Results');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;proc report data = newvals nowd missing;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; column date_asof&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ATM_results;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;define date_asof / "As of Date" f=weekdate17. width = 10;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;define ATM_results / "ATM Results" f=comma10. width = 10;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;compute&amp;nbsp;date_asof;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if date_asof = &amp;amp;asofdt. then&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;call define(_row_, 'style', 'style={background=yellow}');&lt;/SPAN&gt;
&lt;DIV&gt;&lt;SPAN&gt; endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;run; &amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods excel close;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thank you&lt;/DIV&gt;
&lt;/DIV&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;</description>
    <pubDate>Tue, 09 Jul 2024 20:57:15 GMT</pubDate>
    <dc:creator>SASGeek</dc:creator>
    <dc:date>2024-07-09T20:57:15Z</dc:date>
    <item>
      <title>Having problems with ODS Excel and dates and highlighting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935233#M26641</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm have a problem with no highlighting in my results. I get results as expected (and yes, there is a 31Aug2022 in my dates) but nothing highlights. My code is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let asofdt = '31Aug2022'd;&lt;/P&gt;
&lt;P&gt;%let newfile = Newfile_data.xlsx;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods excel file = "&amp;amp;newfile." &lt;BR /&gt;options (Sheet_Name = 'Focus_Results');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;proc report data = newvals nowd missing;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; column date_asof&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ATM_results;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;define date_asof / "As of Date" f=weekdate17. width = 10;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;define ATM_results / "ATM Results" f=comma10. width = 10;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;compute&amp;nbsp;date_asof;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if date_asof = &amp;amp;asofdt. then&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;call define(_row_, 'style', 'style={background=yellow}');&lt;/SPAN&gt;
&lt;DIV&gt;&lt;SPAN&gt; endcomp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;run; &amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods excel close;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thank you&lt;/DIV&gt;
&lt;/DIV&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;</description>
      <pubDate>Tue, 09 Jul 2024 20:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935233#M26641</guid>
      <dc:creator>SASGeek</dc:creator>
      <dc:date>2024-07-09T20:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems with ODS Excel and dates and highlighting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935238#M26642</link>
      <description>&lt;P&gt;I think you are missing DEFINE statement usage options (eg. DISPLAY); Do you have a clean log?&amp;nbsp;&lt;BR /&gt;See the modification below and try it.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;define date_asof / "As of Date" f=weekdate17. width = 10 display;
define ATM_results / "ATM Results" f=comma10. width = 10 display;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jul 2024 21:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935238#M26642</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2024-07-09T21:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems with ODS Excel and dates and highlighting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935239#M26643</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/321371"&gt;@A_Kh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think you are missing DEFINE statement usage options (eg. DISPLAY); Do you have a clean log?&amp;nbsp;&lt;BR /&gt;See the modification below and try it.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;define date_asof / "As of Date" f=weekdate17. width = 10 display;
define ATM_results / "ATM Results" f=comma10. width = 10 display;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Bet his log has:&lt;/P&gt;
&lt;PRE&gt;NOTE: Variable date_asof is uninitialized.

&lt;/PRE&gt;
&lt;P&gt;By default numeric variables, which include dates, would be SUMMED. Which is why with my small example data set (HINT HINT HINT &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/93090"&gt;@SASGeek&lt;/a&gt; ) of:&lt;/P&gt;
&lt;PRE&gt;data work.newvals;
   input date_asof :date9. atm_results;
   format date_asof date9.;
datalines;
31Aug2022  123456
01Sep2022  34555
02Oct2022  11111
;&lt;/PRE&gt;
&lt;P&gt;The result looked like the following. Please note the displayed date.&lt;/P&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX2" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" cellspacing="0" cellpadding="3"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c m header" scope="col"&gt;As of Date&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;ATM Results&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;Thu, Feb 1, 2148&lt;/TD&gt;
&lt;TD class="r data"&gt;169,122&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Jul 2024 22:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935239#M26643</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-07-09T22:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems with ODS Excel and dates and highlighting</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935313#M26644</link>
      <description>&lt;P&gt;Thank you so much. Using the display worked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To answer your question: I did have a clean log and the output looked fine, it's just that it didn't highlight.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 13:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Having-problems-with-ODS-Excel-and-dates-and-highlighting/m-p/935313#M26644</guid>
      <dc:creator>SASGeek</dc:creator>
      <dc:date>2024-07-10T13:11:57Z</dc:date>
    </item>
  </channel>
</rss>

