<?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 dates won't import from Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691908#M210668</link>
    <description>Try using XLSX instead to import your data but using Excel means you have limitations on the control of the type of data you're importing. In the long it would be best to change your data format to a CSV. &lt;BR /&gt;&lt;BR /&gt;PROC IMPORT OUT=WORK.&amp;amp;INSHEET&lt;BR /&gt;      DATAFILE="filepathway...\NHSN_LTCF_covid19 &amp;amp;extract_date..xlsx"&lt;BR /&gt;      DBMS=XLSX REPLACE;&lt;BR /&gt;      SHEET="&amp;amp;INSHEET.$";&lt;BR /&gt;      GETNAMES=YES;&lt;BR /&gt;   &lt;BR /&gt;RUN;</description>
    <pubDate>Thu, 15 Oct 2020 17:00:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-10-15T17:00:39Z</dc:date>
    <item>
      <title>SAS dates won't import from Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691899#M210664</link>
      <description>&lt;P&gt;I have been using the same code and data source to run weekly reports without any issues using, however, this week one of my date columns will not import from Excel. The variable 'collectiondate' is formatted as Date in Excel but when it imports to SAS the entire column of data is missing and the informat and format of the column are TIME8. instead of the preferred DATE9. format that I have been using. It shows up the same way in all four of the data sets created. Any idea why this would be happening all of a sudden and ideas on how to fix it? I had been using 9.3 but recently switched to 9.4 if that makes any difference. Screenshots and code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Excel screenshot.png" style="width: 141px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50693i3B946299E5453132/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Excel screenshot.png" alt="Excel screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SAS screenshot.png" style="width: 154px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50692iF7E59E602D91E19C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SAS screenshot.png" alt="SAS screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS MPRINT;

%MACRO IMP(INSHEET=);
PROC IMPORT OUT=WORK.&amp;amp;INSHEET
      DATAFILE="filepathway...\NHSN_LTCF_covid19 &amp;amp;extract_date..xlsx"
      DBMS=EXCEL REPLACE;
      SHEET="&amp;amp;INSHEET.$";
      GETNAMES=YES;
      MIXED=NO;
      SCANTEXT=YES;
      USEDATE=YES;
      SCANTIME=YES;
RUN;

%MEND IMP;

%IMP(INSHEET=covid19res);
%IMP(INSHEET=covid19staff);
%IMP(INSHEET=covid19supp);
%IMP(INSHEET=covid19vent);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Oct 2020 16:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691899#M210664</guid>
      <dc:creator>wml_3</dc:creator>
      <dc:date>2020-10-15T16:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dates won't import from Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691908#M210668</link>
      <description>Try using XLSX instead to import your data but using Excel means you have limitations on the control of the type of data you're importing. In the long it would be best to change your data format to a CSV. &lt;BR /&gt;&lt;BR /&gt;PROC IMPORT OUT=WORK.&amp;amp;INSHEET&lt;BR /&gt;      DATAFILE="filepathway...\NHSN_LTCF_covid19 &amp;amp;extract_date..xlsx"&lt;BR /&gt;      DBMS=XLSX REPLACE;&lt;BR /&gt;      SHEET="&amp;amp;INSHEET.$";&lt;BR /&gt;      GETNAMES=YES;&lt;BR /&gt;   &lt;BR /&gt;RUN;</description>
      <pubDate>Thu, 15 Oct 2020 17:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691908#M210668</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-15T17:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS dates won't import from Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691913#M210670</link>
      <description>&lt;P&gt;This solved the problem on the data not entering - thanks! Had to take a few more steps to get it into the correct format but at least I can work with it now.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 17:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-dates-won-t-import-from-Excel/m-p/691913#M210670</guid>
      <dc:creator>wml_3</dc:creator>
      <dc:date>2020-10-15T17:15:20Z</dc:date>
    </item>
  </channel>
</rss>

