<?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: import excels whose format and extension don't match in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435947#M108337</link>
    <description>&lt;P&gt;That is great. Thank you! Later one friend solved this problem for me by writing some python codes.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Feb 2018 14:33:37 GMT</pubDate>
    <dc:creator>Shortselling123</dc:creator>
    <dc:date>2018-02-10T14:33:37Z</dc:date>
    <item>
      <title>import excels whose format and extension don't match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435907#M108320</link>
      <description>&lt;P&gt;Hi SAS experts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway we can import excels into SAS when excels' format does not match the extension? See attached photo. I can open the excel by simply clicking "yes."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the SAS log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2181 PROC IMPORT OUT=jpmorgan DATAFILE= "C:\Users\Research.xls" DBMS=xls REPLACE;&lt;BR /&gt;2181! GETNAMES=YES; RUN;&lt;/P&gt;&lt;P&gt;Spreadsheet isn't from Excel V5 or later. Please open it in Excel and Save as V5 or later&lt;BR /&gt;Requested Input File Is Invalid&lt;BR /&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&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-inline" image-alt="format not match extension.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18441i9E4E70FE141BDC93/image-size/large?v=v2&amp;amp;px=999" role="button" title="format not match extension.PNG" alt="format not match extension.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 23:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435907#M108320</guid>
      <dc:creator>Shortselling123</dc:creator>
      <dc:date>2018-02-09T23:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: import excels whose format and extension don't match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435908#M108321</link>
      <description>&lt;P&gt;Easiest might be to open the "xls" file in Excel and do a File Save As into a CSV file and import that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or do a&amp;nbsp;File Save As&amp;nbsp;to XLSX using Excel as recommended by the SAS error message.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 23:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435908#M108321</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-09T23:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: import excels whose format and extension don't match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435910#M108322</link>
      <description>Thanks. Unfortunately I have thousands of such excels and it is very time consuming to change format manually.&lt;BR /&gt;</description>
      <pubDate>Sat, 10 Feb 2018 00:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435910#M108322</guid>
      <dc:creator>Shortselling123</dc:creator>
      <dc:date>2018-02-10T00:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: import excels whose format and extension don't match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435911#M108323</link>
      <description>&lt;P&gt;Then you're best off using a VBS script to convert them all to XLSX. There's a SAS macro on here that does it, see the link below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/43/496.html" target="_blank"&gt;http://support.sas.com/kb/43/496.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once they're XLSX you can use PROC IMPORT. If the file formats are the same though, you may want to consider CSV instead. You can change the type by changing the number &amp;nbsp;and extension on the Excel file Save As command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; mybook.SaveAs ""&amp;amp;default.\"" &amp;amp; Filename &amp;amp; "".xlsx"", 51";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CSV looks to be Number 6 instead:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/vba/excel-vba/articles/xlfileformat-enumeration-excel" target="_blank"&gt;https://msdn.microsoft.com/en-us/vba/excel-vba/articles/xlfileformat-enumeration-excel&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Hi SAS experts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anyway we can import excels into SAS when excels' format does not match the extension? See attached photo. I can open the excel by simply clicking "yes."&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the SAS log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2181 PROC IMPORT OUT=jpmorgan DATAFILE= "C:\Users\Research.xls" DBMS=xls REPLACE;&lt;BR /&gt;2181! GETNAMES=YES; RUN;&lt;/P&gt;
&lt;P&gt;Spreadsheet isn't from Excel V5 or later. Please open it in Excel and Save as V5 or later&lt;BR /&gt;Requested Input File Is Invalid&lt;BR /&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sat, 10 Feb 2018 00:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435911#M108323</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-10T00:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: import excels whose format and extension don't match</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435947#M108337</link>
      <description>&lt;P&gt;That is great. Thank you! Later one friend solved this problem for me by writing some python codes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 14:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-excels-whose-format-and-extension-don-t-match/m-p/435947#M108337</guid>
      <dc:creator>Shortselling123</dc:creator>
      <dc:date>2018-02-10T14:33:37Z</dc:date>
    </item>
  </channel>
</rss>

