<?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: excel doesn'  t recognize date format in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72927#M8307</link>
    <description>I made the below changes. I put only the coding that I made changes on the existing program that I posted before. but I am getting error  below error :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ERROR: DDE session not ready.&lt;BR /&gt;
FATAL: Unrecoverable I/O error detected in the execution of the DATA step program.  Aborted during the EXECUTION phase.&lt;BR /&gt;
&lt;BR /&gt;
 the coding that I made changes are below&lt;BR /&gt;
----------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
proc template &lt;BR /&gt;
define style newstyle;&lt;BR /&gt;
parent = styles.normal;&lt;BR /&gt;
&lt;BR /&gt;
style data_date9 from data /&lt;BR /&gt;
just=right&lt;BR /&gt;
tagattr='format:ddmmmyyyy type:DateTime';&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelXP path='C:\' file='MYTEST.xml'  style=newstyle rs= none;&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINT DATA=TEMP;&lt;BR /&gt;
var X / style(data)=data_date9; /*Add this row*/&lt;BR /&gt;
FORMAT X DATE9.;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
 put '[open("C:\MYTEST.xml")]';</description>
    <pubDate>Wed, 31 Mar 2010 22:56:53 GMT</pubDate>
    <dc:creator>Inp</dc:creator>
    <dc:date>2010-03-31T22:56:53Z</dc:date>
    <item>
      <title>excel doesn'  t recognize date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72925#M8305</link>
      <description>Hi Dear,&lt;BR /&gt;
Here is my coding.  When I run the below coding I am able create MYTEST.xls but when I open the xls sheet, and try to use the custom filter, then I try to use ' is greatter than' or 'is less than' from the drop down panel , it doesn't work. Basically it seems, it doesn't recognize the date format. Can  any one help to me fix this problem.  I am using SAS 9.2 on Windows XP service pack 3. Do I have install any SAS patch to fix this issue?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
DATA TEMP;&lt;BR /&gt;
X='23MAR2009'D;&lt;BR /&gt;
OUTPUT;&lt;BR /&gt;
X='22APR2007'D;&lt;BR /&gt;
OUTPUT;&lt;BR /&gt;
X='22MAR2010'D;&lt;BR /&gt;
OUTPUT;&lt;BR /&gt;
RUN;&lt;BR /&gt;
ods listing close;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelXP path='C:\' file='MYTEST.xls'  style=newstyle rs= none;&lt;BR /&gt;
ods tagsets.excelXP options(&lt;BR /&gt;
Sheet_Name='TEST'                  Embedded_Titles='YES'&lt;BR /&gt;
Embedded_Footnotes = 'YES'	Embed_Titles_Once='YES'&lt;BR /&gt;
Suppress_Bylines='YES'	Sheet_Interval='NONE'&lt;BR /&gt;
Frozen_Headers='2'		  Autofilter='ALL'&lt;BR /&gt;
Absolute_Column_Width='10'&lt;BR /&gt;
	                         );&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINT DATA=TEMP;&lt;BR /&gt;
FORMAT X DATE9.;&lt;BR /&gt;
RUN;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
options noxwait noxsync;&lt;BR /&gt;
x '"C:\Program Files\Microsoft Office\OFFICE11\excel.exe" /e';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
x=sleep(3);  &lt;BR /&gt;
run;&lt;BR /&gt;
filename cmds dde 'excel|system' ;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file cmds;&lt;BR /&gt;
  put '[app.minimize]';&lt;BR /&gt;
  put '[open("C:\MYTEST.xls")]';&lt;BR /&gt;
  put '[error("false")]';&lt;BR /&gt;
  put '[SAVE.AS("C:\MYTEST.xls",1)]';&lt;BR /&gt;
	  put '[close("false")]';&lt;BR /&gt;
      put '[quit()]';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 31 Mar 2010 22:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72925#M8305</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2010-03-31T22:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: excel doesn'  t recognize date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72926#M8306</link>
      <description>You need to add a style definition to your Proc Template code that created your style called "newstyle".  Add the following:&lt;BR /&gt;
&lt;BR /&gt;
style data_date9 from data /&lt;BR /&gt;
  just=right&lt;BR /&gt;
  tagattr='format:ddmmmyyyy type:DateTime';&lt;BR /&gt;
&lt;BR /&gt;
Then your Proc Print should read:&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINT DATA=TEMP;&lt;BR /&gt;
var X / style(data)=data_date9; /*Add this row*/&lt;BR /&gt;
FORMAT X DATE9.;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Also, in the ODS tagsets.excelXP statement, the file statement should have a .XML suffix not .XLS.  You would also need to change it in your DDE section under the file open command.

fixed .xlm to .xml &lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: Ross</description>
      <pubDate>Wed, 31 Mar 2010 22:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72926#M8306</guid>
      <dc:creator>Ross</dc:creator>
      <dc:date>2010-03-31T22:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: excel doesn'  t recognize date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72927#M8307</link>
      <description>I made the below changes. I put only the coding that I made changes on the existing program that I posted before. but I am getting error  below error :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ERROR: DDE session not ready.&lt;BR /&gt;
FATAL: Unrecoverable I/O error detected in the execution of the DATA step program.  Aborted during the EXECUTION phase.&lt;BR /&gt;
&lt;BR /&gt;
 the coding that I made changes are below&lt;BR /&gt;
----------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
proc template &lt;BR /&gt;
define style newstyle;&lt;BR /&gt;
parent = styles.normal;&lt;BR /&gt;
&lt;BR /&gt;
style data_date9 from data /&lt;BR /&gt;
just=right&lt;BR /&gt;
tagattr='format:ddmmmyyyy type:DateTime';&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.excelXP path='C:\' file='MYTEST.xml'  style=newstyle rs= none;&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINT DATA=TEMP;&lt;BR /&gt;
var X / style(data)=data_date9; /*Add this row*/&lt;BR /&gt;
FORMAT X DATE9.;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
 put '[open("C:\MYTEST.xml")]';</description>
      <pubDate>Wed, 31 Mar 2010 22:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excel-doesn-t-recognize-date-format/m-p/72927#M8307</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2010-03-31T22:56:53Z</dc:date>
    </item>
  </channel>
</rss>

