<?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: PROC IMPORT problem with XLSX import in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159289#M41592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone figure out the cause of this problem and the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Jitendra Pandey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2015 18:49:09 GMT</pubDate>
    <dc:creator>jitendra_pandey</dc:creator>
    <dc:date>2015-06-22T18:49:09Z</dc:date>
    <item>
      <title>PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159283#M41586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Enterprise Guide version 6.1 M1,&amp;nbsp; SAS 9.4 TS1M1, the operating system is Windows 7 x64 Professional.&lt;/P&gt;&lt;P&gt;My program tries to import a relatively big .xlxs file with 177000 rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;PROC IMPORT&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;OUT= WORK.data&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;DATAFILE="C:\data.xlsx"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;DBMS=XLSX;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;SHEET="data";&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;GETNAMES=YES;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each time I run it SAS gives me the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Could not find sheet (xl//xl/worksheets/Sheet1.xml) in xlsx file.&amp;nbsp; rc=8014900E (-2146136050)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;Requested Input File Is Invalid&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;ERROR: Import unsuccessful.&amp;nbsp; See SAS Log for details.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no worksheet with the name Sheet1 in that file. Meanwhile if I try to import it via the import wizard (file&amp;gt;Import Data) everything works fine. Also if I save the file in excel 2007 it is possible to import it using the program. But after saving it has already 65536 rows the other data is somehow lost.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;First I tried to perform this import using SAS 9.3 and it gave me an exception message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ERROR:&amp;nbsp; An exception has been encountered.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Please contact technical support and provide them with the following traceback information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The SAS task name is [IMPORT (2)]&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ERROR:&amp;nbsp; Read Access Violation IMPORT (2)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Exception occurred at (088902A9)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Task Traceback&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Address&amp;nbsp;&amp;nbsp; Frame&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (DBGHELP API Version 4.0 rev 5)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;00000000088902A9&amp;nbsp; 00000000090A3CB0&amp;nbsp; sasimxlx:tkvercn1+0xF269&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;000000000888D36A&amp;nbsp; 00000000090CD490&amp;nbsp; sasimxlx:tkvercn1+0xC32A&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;00000000088892EB&amp;nbsp; 00000000090CE660&amp;nbsp; sasimxlx:tkvercn1+0x82AB&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;00000000088817E3&amp;nbsp; 00000000090CE6A0&amp;nbsp; sasimxlx:tkvercn1+0x7A3&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;0000000008852E41&amp;nbsp; 00000000090CE6A8&amp;nbsp; sasimctr:tkvercn1+0x1E01&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;00000000088517C4&amp;nbsp; 00000000090CF770&amp;nbsp; sasimctr:tkvercn1+0x784&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;0000000008831277&amp;nbsp; 00000000090CF778&amp;nbsp; sasimpor:tkvercn1+0x237&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;00000000033F8FD7&amp;nbsp; 00000000090CFCB8&amp;nbsp; sashost:Main+0xF917&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;00000000033FD5FD&amp;nbsp; 00000000090CFF50&amp;nbsp; sashost:Main+0x13F3D&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;0000000076AA59ED&amp;nbsp; 00000000090CFF58&amp;nbsp; kernel32:BaseThreadInitThunk+0xD&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;0000000076CDC541&amp;nbsp; 00000000090CFF88&amp;nbsp; ntdll:RtlUserThreadStart+0x21&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably it is worth to mention that I have no MS Office installed on the PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have a question whether it is possible to import such a file using a program? I would suggest that it must be possible since everything works fine with the import wizard for both SAS versions. Saving files once more is not an option either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every advise or hint is very appreciated. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 10:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159283#M41586</guid>
      <dc:creator>IgorShumeiko</dc:creator>
      <dc:date>2014-11-06T10:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159284#M41587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try taking the DBMS=XLSX out.&amp;nbsp; Also you may find it will not work if you don't have office installed, cant check at the moment, but I believe proc import uses the jet engine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 11:12:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159284#M41587</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-11-06T11:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159285#M41588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replay! But it works on the same PC via the import wizard. Do they use different features? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 11:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159285#M41588</guid>
      <dc:creator>IgorShumeiko</dc:creator>
      <dc:date>2014-11-06T11:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159286#M41589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quite possibly, I will let the EG experts however cover that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 12:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159286#M41589</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-11-06T12:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159287#M41590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im pretty sure the wizard from the file menu in EG gives you the code it uses to read in the data (as a tab next to the log and output data tabs). I also think it defaults to using data step with an infile statement which would not require Office. The reason you lose data when changes the file extension is the row limitation that older excel files had of 65K rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course in EG if the wizard is part of your process flow it should work fine each time it is ran. Is there a reason that you are trying to move to proc import?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 12:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159287#M41590</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2014-11-06T12:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159288#M41591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replay!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are right the wizard gives a possibility to look into the code of the importing process. Inside the text of the code we can read this:&lt;/P&gt;&lt;P&gt;Of course there is no explanation on how that temporary file was created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; This DATA step reads the data values from a temporary text file&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; created by the Import Data wizard. The values within the temporary&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; text file were extracted from the Excel source file.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I cannot dynamically pass a parameter to the wizard which would content a file name of a file I am going to import. I assume that it is not possible. Correct me please if I am wrong. I would like to avoid letting the user change the code. That's why I have to do it the way shown in the first message.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 13:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159288#M41591</guid>
      <dc:creator>IgorShumeiko</dc:creator>
      <dc:date>2014-11-06T13:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159289#M41592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone figure out the cause of this problem and the solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Jitendra Pandey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159289#M41592</guid>
      <dc:creator>jitendra_pandey</dc:creator>
      <dc:date>2015-06-22T18:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159290#M41593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*figured&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 18:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159290#M41593</guid>
      <dc:creator>jitendra_pandey</dc:creator>
      <dc:date>2015-06-22T18:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159291#M41594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you just changed the extension on the file and not the actual content of the tile.&amp;nbsp; Excel might be smart enough to figure that out, but the SAS XLSX engine is going to expect that it has a validly formatted XLSX file to work on.&amp;nbsp; An XLSX file is just ZIP file with specific content structure.&amp;nbsp; You can look at it with any ZIP file utility to see what files are there and whether the list of work books that SAS is complaining about is there or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 19:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159291#M41594</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-22T19:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159292#M41595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code from the EG import step won't help, as EG uses the MS-supplied .dll to convert the Office file(s) to text which is the sent to the WORK location and read from there, so the code is not Office(Excel) specific.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Preferred solution: export the sheet in question to a reasonable format (.csv!) and import that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS an Excel file with 177000 rows does not constitute a reliable data source anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 05:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159292#M41595</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-06-23T05:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT problem with XLSX import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159293#M41596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What information in LOG ,when you are using LIBNAME statement ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 12:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-problem-with-XLSX-import/m-p/159293#M41596</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-06-23T12:12:09Z</dc:date>
    </item>
  </channel>
</rss>

