<?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 Excel XP and Proc Report in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105930#M29515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hi Everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a report in xml using the excel xp tagsets and proc report. One of the column that I need to display is a date in the format:mmddyy10.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is my define statement in proc report:&lt;/P&gt;&lt;P&gt; define Open_Date /format=date9. 'Open Date'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using auto-filters for the xml output. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Now when the xml output is created the Open Date column shows the format as Text Filters. What I need is instead a Date Filter so that I can filter it according to year. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;IMG alt="open date.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3682_open date.JPG" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="date.bmp" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3683_date.bmp" width="450" /&gt;&lt;/P&gt;&lt;P&gt;How can I do this..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jun 2013 18:09:58 GMT</pubDate>
    <dc:creator>abhi19</dc:creator>
    <dc:date>2013-06-13T18:09:58Z</dc:date>
    <item>
      <title>Excel XP and Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105930#M29515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hi Everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a report in xml using the excel xp tagsets and proc report. One of the column that I need to display is a date in the format:mmddyy10.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is my define statement in proc report:&lt;/P&gt;&lt;P&gt; define Open_Date /format=date9. 'Open Date'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using auto-filters for the xml output. &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Now when the xml output is created the Open Date column shows the format as Text Filters. What I need is instead a Date Filter so that I can filter it according to year. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;IMG alt="open date.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3682_open date.JPG" width="450" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="date.bmp" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3683_date.bmp" width="450" /&gt;&lt;/P&gt;&lt;P&gt;How can I do this..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 18:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105930#M29515</guid>
      <dc:creator>abhi19</dc:creator>
      <dc:date>2013-06-13T18:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Excel XP and Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105931#M29516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You did not show your ALL your code, so this is only a guess. I suspect what is happening is that your SAS formats are being ignored (or turned into "General" format by Excel). This is known Excel behavior. Excel decides what format it should use for your column, based on Excel defaults and not necessarily what you set in SAS. This is how leading zeroes, decimal places, date formats, percents, column widths, etc, etc get "messed up" when you open your HTML or XML file with Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If you are using HTML and ODS, then you need to pass a Microsoft number format (mso-number-format) from SAS to Excel using the HTMLSTYLE attribute. If you are using TAGSETS.EXCELXP and ODS to make an XML 2003 file, then you need to pass your Microsoft format (your MICROSOFT format) from SAS to Excel using the TAGATTR style attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; There are 2 Tech Support notes that are relevant:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/38/105.html"&gt;http://support.sas.com/kb/38/105.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/38/143.html"&gt;http://support.sas.com/kb/38/143.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; By default, if you send NO other controls, I believe that TAGSETS.EXCELXP converts your date to a text string and sends it to Excel. In particular, when you use PROC REPORT, if you have your DATE variable as an ORDER or GROUP item, then even with TAGATTR, you still see an autofilter of Text Filter in Excel. But, if you have a different usage (such as DISPLAY), then you should see Date Filter, as shown in the attached screenshot. The code I used was modified from the Tech Support note about dates above. Note the autofilter difference for join_iso vs dob_iso in the screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, here are some papers on the subject:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf" title="http://support.sas.com/resources/papers/proceedings11/266-2011.pdf"&gt;http://support.sas.com/resources/papers/proceedings11/266-2011.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings10/031-2010.pdf" title="http://support.sas.com/resources/papers/proceedings10/031-2010.pdf"&gt;http://support.sas.com/resources/papers/proceedings10/031-2010.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data bday;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ** make "regular dates" and also, make&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISO format versions of the dates;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; infile datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; input name $ dob : mmddyy8. join_date : mmddyy8.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; join_iso = dhms(join_date,0,0,0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; dob_iso = dhms(dob,0,0,0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;return;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;alan 11/29/84 06/17/13&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;barb 01/14/78 06/14/13&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;carl 08/23/92 06/17/13&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;dave 05/03/62 06/14/13&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp file='c:\temp\testdate.xml'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options(autofilter='on' sheet_name='One') style=sasweb;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=bday nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '1) Use ISO Date and TAGATTR Excel';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column join_date join_iso name dob dob_iso;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define join_date / f=date9. order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define join_iso / order f=is8601dt.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='TYPE:DateTime format:mm/dd/yy;@'}; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define name / order;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define dob /display f=date9.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define dob_iso / display f=is8601dt.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style(column)={tagattr='TYPE:DateTime format:mm/dd/yy;@'}; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11809i55BC902E6C9CB841/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="excel_filter_date.png" title="excel_filter_date.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Jun 2013 15:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105931#M29516</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-06-15T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Excel XP and Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105932#M29517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Cynthia. It worked well. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 17:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Excel-XP-and-Proc-Report/m-p/105932#M29517</guid>
      <dc:creator>abhi19</dc:creator>
      <dc:date>2013-06-17T17:41:45Z</dc:date>
    </item>
  </channel>
</rss>

