<?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: SAS 9.4 PROC EXPORT XLSX in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832995#M329290</link>
    <description>&lt;P&gt;Looks like you might be getting this problem:&amp;nbsp;&lt;A href="https://support.sas.com/kb/58/526.html" target="_blank"&gt;58526 - The ddmmyy10. format writes different values to different sheets when you are using the XLSX driver to export to EXCEL (sas.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What SAS maintenance release are you using?&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 20:09:53 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-09-12T20:09:53Z</dc:date>
    <item>
      <title>SAS 9.4 PROC EXPORT XLSX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832980#M329284</link>
      <description>&lt;P&gt;I have an issue on SAS 9.4, using proc export.&lt;/P&gt;&lt;P&gt;The dataset to be exported, has a date field which is not exporting correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all records where the value of the date field in the original file is &amp;lt;= 12/31/1959,&lt;/P&gt;&lt;P&gt;then the value of that field in the exported XLSX file, is 12/31/1959.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed the values in that column by hand before exporting to check,&lt;/P&gt;&lt;P&gt;and found that 12/31/1959 is the boundary line between exporting correctly and not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make sure the problem wasn't (say) corrupted data, I also tried adding 20 years&lt;/P&gt;&lt;P&gt;to each value in the date field using INTX, before exporting, so that all values were &amp;gt; 12-31-1959,&lt;/P&gt;&lt;P&gt;and all the new values were exported to .XLSX correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The syntax of the export is&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Export data=work.dataset&lt;/P&gt;&lt;P&gt;outfile&amp;nbsp; = "/mydir/outfile.xlsx"&lt;/P&gt;&lt;P&gt;dbms=xlsx&lt;/P&gt;&lt;P&gt;replace label;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Incidentally, this issue occurs when the field in the exported file is in DDMMYY10. format&lt;/P&gt;&lt;P&gt;(which fulfills a business rule), but does *NOT* occur when the field is in DATE9. format.&lt;/P&gt;&lt;P&gt;For DATE9, correctly exported values of 01/01/1959 in the SAS dataset,&amp;nbsp;&lt;/P&gt;&lt;P&gt;become '1-Jan-59' in the exported .XLSX file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this is known issue, or is there a workaround for it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 19:07:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832980#M329284</guid>
      <dc:creator>SAS_MAN_MN</dc:creator>
      <dc:date>2022-09-12T19:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 PROC EXPORT XLSX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832983#M329286</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;For all records where the value of the date field in the original file is &amp;lt;= 12/31/1959,&amp;nbsp;then the value of that field in the exported XLSX file, is 12/31/1959.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not experiencing this. I get the expected output in Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
    date='02JAN1929'd;
    format date ddmmyy10.;
run;
proc export data=a outfile="test.xlsx" dbms=excel replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Sep 2022 19:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832983#M329286</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-12T19:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS 9.4 PROC EXPORT XLSX</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832995#M329290</link>
      <description>&lt;P&gt;Looks like you might be getting this problem:&amp;nbsp;&lt;A href="https://support.sas.com/kb/58/526.html" target="_blank"&gt;58526 - The ddmmyy10. format writes different values to different sheets when you are using the XLSX driver to export to EXCEL (sas.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What SAS maintenance release are you using?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 20:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-9-4-PROC-EXPORT-XLSX/m-p/832995#M329290</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-09-12T20:09:53Z</dc:date>
    </item>
  </channel>
</rss>

