<?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: Read a zipped Excel file ?? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214357#M52828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When it is only an excel file xlsx type being zipped it makes no sense.&amp;nbsp; The xlsx file is an zip-file having xml files and references inside it. You can open an xlsx file with 7zip yourself yourself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2015 11:03:21 GMT</pubDate>
    <dc:creator>jakarman</dc:creator>
    <dc:date>2015-04-02T11:03:21Z</dc:date>
    <item>
      <title>Read a zipped Excel file ??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214354#M52825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to read an Excel file that has been zipped.&amp;nbsp; The Excel file name is new_file.xlsx.&amp;nbsp; It has been zipped and sits in c:\docs\new_file.zip.&lt;/P&gt;&lt;P&gt;How do I read this file without manually unzipping it first?&amp;nbsp; I have tried Proc Import and x command.&amp;nbsp; Here is my attempt using x command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"cd C:\Program Files\7-Zip\"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'7z.exe e -o C:\docs\OUTPUT.xlsx C:\docs\new_file.zip'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;When I run this code I don't get any errors.&amp;nbsp; It does not seem to produce any output either.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Any suggestions would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Thank you!&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 15:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214354#M52825</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2015-04-01T15:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zipped Excel file ??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214355#M52826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With SAS 9.4 you can use the filename statement to access a zip file. Have a look at &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/67407/HTML/default/n1dn0f61yfyzton1l2ngsa1clllr.htm" title="http://support.sas.com/documentation/cdl/en/lestmtsref/67407/HTML/default/n1dn0f61yfyzton1l2ngsa1clllr.htm"&gt;FILENAME Statement, ZIP Access Method :: SAS(R) 9.4 Statements: Reference, Third Edition&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 08:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214355#M52826</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2015-04-02T08:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zipped Excel file ??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214356#M52827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get the output of external commands into the log, use this construct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename oscmd pipe "your_command 2&amp;gt;&amp;amp;1";* the 2&amp;gt;&amp;amp;1 redirects stderr output to stdout;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;infile oscmd;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You won't be able to do it all in one step, though; the ZIP file access method can only read text from zipped files. So you will have to unzip the file first and then use one of the excel access methods (probably libname xlsx) to read from the .xlsx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 08:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214356#M52827</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-04-02T08:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zipped Excel file ??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214357#M52828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When it is only an excel file xlsx type being zipped it makes no sense.&amp;nbsp; The xlsx file is an zip-file having xml files and references inside it. You can open an xlsx file with 7zip yourself yourself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214357#M52828</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-04-02T11:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read a zipped Excel file ??</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214358#M52829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Andreas pointed out, FILENAME ZIP can be used to extract the file, and then you can read the result with PROC IMPORT.&amp;nbsp; See &lt;A href="http://blogs.sas.com/content/sasdummy/2014/01/29/using-filename-zip/"&gt;examples of using FILENAME ZIP in this blog post&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Read-a-zipped-Excel-file/m-p/214358#M52829</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-04-02T11:45:56Z</dc:date>
    </item>
  </channel>
</rss>

