<?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 XLSX file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397220#M95985</link>
    <description>&lt;P&gt;You likely don't have the same versions (Excel or SAS) on the machines - ie 32 vs 64 bit somewhere.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using DBMS=XLSX as suggested earlier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may need the PC FILE SERVER if you're having issues related to different bits, ie SAS is 64 bit but Excel is 32 bit.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2017 18:06:08 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-09-19T18:06:08Z</dc:date>
    <item>
      <title>Import XLSX file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397185#M95969</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;Importing xlsx file into SAS is very complicate.&lt;/P&gt;
&lt;P&gt;I want import my file (attached). The whole sheet1 will be imported as text.&lt;/P&gt;
&lt;P&gt;I run the below code in my PC and it works fine.&lt;/P&gt;
&lt;P&gt;Then I run it in my office PC and error show up. This is the error I saw few times and lookup solution but no help.&lt;/P&gt;
&lt;P&gt;I copy the ERROR notice and the log for "proc setinit;run;" and I have&amp;nbsp;&lt;SPAN&gt;---SAS/ACCESS Interface to PC Files&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Please anyone can help me with that.&lt;/P&gt;
&lt;P&gt;Thank you so much,&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
PROC IMPORT OUT=WORK.sample
		DATAFILE="C:\Users\a_sample.xlsx"
		DBMS=EXCEL REPLACE ;
	RANGE="Sheet1$";
	MIXED=YES;
	Getnames=no;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ERROR: Connect: Class not registered&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;Connection Failed. See 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.05 seconds&lt;BR /&gt; cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---Base SAS Software&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/STAT&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/GRAPH&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ETS&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/FSP&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/OR&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/AF&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/IML&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/QC&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/SHARE&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/LAB&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ASSIST&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/CONNECT&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/INSIGHT&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/EIS&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/GIS&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/SHARE*NET&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Enterprise Miner&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---MDDB Server common products&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Integration Technologies&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/Secure Windows&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Text Miner&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/Genetics&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Enterprise Guide&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Bridge for ESRI&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---OR OPT&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---OR PRS&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---OR IVS&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---OR LSO&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to DB2&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Oracle&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Sybase&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to PC Files&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to ODBC&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to OLE DB&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Teradata&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to MySQL&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Enterprise Miner for Desktop&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/IML Studio&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Workspace Server for Local Access&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Netezza&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Aster nCluster&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Greenplum&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS/ACCESS Interface to Sybase IQ&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---DataFlux Trans DB Driver&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Framework Data Server&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---Reserved for Dataflux&lt;BR /&gt; 14NOV2017&lt;BR /&gt;---SAS Add-in for Microsoft Excel&lt;BR /&gt; 14NOV2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 16:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397185#M95969</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-09-19T16:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Import XLSX file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397197#M95974</link>
      <description>First problem: Excel is not suitable for storing data, because the file- structure is not compatible to normal data storage. Importing an Excel file almost always forces post-processing steps in order to use the dataset afterwards.&lt;BR /&gt;&lt;BR /&gt;Using SAS 9.4 try libname xlsx or dbms=xlsx with proc import. Setting guessingrows option in proc import to higher value can he help.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Sep 2017 16:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397197#M95974</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-09-19T16:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import XLSX file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397212#M95979</link>
      <description>&lt;P&gt;It could be related to this problem&amp;nbsp;&lt;A href="http://support.sas.com/kb/43/933.html" target="_blank"&gt;http://support.sas.com/kb/43/933.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 17:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397212#M95979</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-09-19T17:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Import XLSX file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397215#M95982</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my situation, XLSX is the only choice.&lt;/P&gt;
&lt;P&gt;I am using SAS 9.3 64bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HC&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 17:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397215#M95982</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-09-19T17:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import XLSX file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397220#M95985</link>
      <description>&lt;P&gt;You likely don't have the same versions (Excel or SAS) on the machines - ie 32 vs 64 bit somewhere.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using DBMS=XLSX as suggested earlier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may need the PC FILE SERVER if you're having issues related to different bits, ie SAS is 64 bit but Excel is 32 bit.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 18:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/397220#M95985</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-19T18:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Import XLSX file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/401716#M97501</link>
      <description>&lt;P&gt;One general suggestion ... rather than trying to import the whole Excel sheet (which includes a lot of title stuff, etc), I recommend to always specify just the range of cells with the data. And then once you're doing that, I also suggest using getnames-yes. The spreadsheet will generally import much more cleanly &amp;amp; usable, when you specify the range. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT OUT=WORK.sample&lt;BR /&gt; DATAFILE="U:\a_sample.xlsx"&lt;BR /&gt; DBMS=EXCEL REPLACE ;&lt;BR /&gt; RANGE="Sheet1$&lt;STRONG&gt;A11:Q18&lt;/STRONG&gt;";&lt;BR /&gt; MIXED=YES;&lt;BR /&gt; Getnames=&lt;STRONG&gt;yes&lt;/STRONG&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this specific case, if using dbms=EXCEL isn't working on one particular computer, I would recommend bringing up the spreadsheet in Excel, and then re-saving it in the older "Excel 97-2003" format (the extension will then be .xls rather than .xlsx). And then you can try using SAS' dbms=XLS, which I believe uses code which SAS developers wrote to import the spreadsheet (whereas I believe dbms=EXCEL uses the Microsoft Jet engine ... or something like that).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT OUT=WORK.sample&lt;BR /&gt; DATAFILE="U:\a_sample.&lt;STRONG&gt;xls&lt;/STRONG&gt;"&lt;BR /&gt; DBMS=&lt;STRONG&gt;XLS&lt;/STRONG&gt; REPLACE ;&lt;BR /&gt; RANGE="Sheet1$&lt;STRONG&gt;A11:Q18&lt;/STRONG&gt;";&lt;BR /&gt; MIXED=YES;&lt;BR /&gt; Getnames=&lt;STRONG&gt;yes&lt;/STRONG&gt;;&lt;BR /&gt;run;&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="import.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15660i9BC87BDCF18DABF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="import.png" alt="import.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 12:29:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-XLSX-file/m-p/401716#M97501</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2017-10-06T12:29:49Z</dc:date>
    </item>
  </channel>
</rss>

