<?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: Reading all worksheets from XLS file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568601#M75176</link>
    <description>&lt;P&gt;PROC DATASET shows empty list for that library.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to compare an XLSX to XLS file and produce some sort of report. It is really on-demand, and the XLS files are spreadout in different folder structures. Also they are old proprietary files. So we want to convert them all to XLSX files in the extreme worst case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if we are able to read atleast the sheet names from the XLS files, we can do the proc import in loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for spending your valuable time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 22:38:18 GMT</pubDate>
    <dc:creator>Ramesh_165</dc:creator>
    <dc:date>2019-06-24T22:38:18Z</dc:date>
    <item>
      <title>Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568446#M75163</link>
      <description>&lt;P&gt;I'd like to read all the worksheets from a .xls file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I tried LIBNAME with EXCEL engine. But it gave me the following error.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&amp;nbsp; &amp;nbsp; &lt;FONT color="#FF0000"&gt;&amp;nbsp;ERROR: The EXCEL engine cannot be found.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR: Error in the LIBNAME statement.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;I tried LIBNAME with PCFILES opotion. I got the below error.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;FONT color="#FF0000"&gt;&amp;nbsp; &amp;nbsp;ERROR: A socket routine returned error: The connection was refused.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR: Unable to connect to server.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR: Error in the LIBNAME statement.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;3. PROC IMPORT procedure needs the sheet names beforehand to loop through and get the sheets as datasets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So any help to overcome the problem to get the solution will be greatly appreciated. Thanks a lot in advance!!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 18:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568446#M75163</guid>
      <dc:creator>Ramesh_165</dc:creator>
      <dc:date>2019-06-24T18:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568462#M75164</link>
      <description>LIBNAME with XLSX.</description>
      <pubDate>Mon, 24 Jun 2019 18:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568462#M75164</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T18:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568475#M75165</link>
      <description>I am sorry I am not aware if you can do it in a single step. There is a discussion here (&lt;A href="https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-multiple-sheets/td-p/149597" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-multiple-sheets/td-p/149597&lt;/A&gt;). What you basically want to do is make a macro and call with different sheet names. If there are too many sheet names to manually enter then before the macro you may want to use VBA on your excel file to extract all sheet names and store it some where and then in a for loop you may call the macro with each sheet name. This is definitely more work if you have many many sheets. If the number of sheets are less you may just call the macro for a simpler solution.&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Jun 2019 18:38:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568475#M75165</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-06-24T18:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568481#M75166</link>
      <description>A response/solution from 2013 may not be relevant today.</description>
      <pubDate>Mon, 24 Jun 2019 18:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568481#M75166</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T18:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568493#M75167</link>
      <description>&lt;P&gt;I'm trying to read XLS file not XLSX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Libname with XLSX to read an XLS file, creates a library but doesn't have any datasets/sheets inside the library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 18:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568493#M75167</guid>
      <dc:creator>Ramesh_165</dc:creator>
      <dc:date>2019-06-24T18:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568496#M75168</link>
      <description>&lt;P&gt;Yes I have close to 100 XLS workbook, and each workbook atleast has couple hundred worksheets. So looking for more of an automatic solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 19:01:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568496#M75168</guid>
      <dc:creator>Ramesh_165</dc:creator>
      <dc:date>2019-06-24T19:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568497#M75169</link>
      <description>It doesn't always show them...I think that's a bug unfortunately. What happens if you run a Proc datasets on that library though? I would consider mass converting them to XLSX (I have a VB script for that if needed) and then importing but that may not be an option. I'm assuming this is a one-time conversion?</description>
      <pubDate>Mon, 24 Jun 2019 19:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568497#M75169</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T19:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568601#M75176</link>
      <description>&lt;P&gt;PROC DATASET shows empty list for that library.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to compare an XLSX to XLS file and produce some sort of report. It is really on-demand, and the XLS files are spreadout in different folder structures. Also they are old proprietary files. So we want to convert them all to XLSX files in the extreme worst case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if we are able to read atleast the sheet names from the XLS files, we can do the proc import in loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for spending your valuable time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 22:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568601#M75176</guid>
      <dc:creator>Ramesh_165</dc:creator>
      <dc:date>2019-06-24T22:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568602#M75177</link>
      <description>Then I'd suggest going back to PCFILES. Post the code you used and make sure the PC FILES SERVER is running.</description>
      <pubDate>Mon, 24 Jun 2019 22:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/568602#M75177</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T22:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570032#M75220</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;LIBNAME with PCFILES worked after getting the proper PCFILE server name and PORT number from our admin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the PCFILES option is working only for the excel files in the windows server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most of our files are unix server, and for which PCFILE option doesn't seem to be working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you have any recommendation/suggestions for the xls files in unix server.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2019 07:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570032#M75220</guid>
      <dc:creator>Ramesh_165</dc:creator>
      <dc:date>2019-06-29T07:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570053#M75222</link>
      <description>Unfortunately I don't think there's a method on Unix Server, xls files are pretty old, Excel changed its file formats over a decade ago (2007) to xlsx.</description>
      <pubDate>Sat, 29 Jun 2019 18:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570053#M75222</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-29T18:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570069#M75223</link>
      <description>&lt;P&gt;What version and maintenance level of SAS are you using, and on what operating system? SAS/ACCESS to PC Files has changed significantly in recent maintenance releases: &lt;A href="https://documentation.sas.com/?docsetId=acpcref&amp;amp;docsetTarget=acpcrefwhatsnew94.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=acpcref&amp;amp;docsetTarget=acpcrefwhatsnew94.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please also post your test code. Did you try the XLSX LIBNAME engine like: libname MyXLSX XLSX 'MyXLSWorkbook'; If that doesn't work correctly, try converting one of your workbooks to XLSX format (FILE SAVE AS) and see if that works OK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With all due respect anyone who designs processes using nearly 100 Excel workbooks each with 200 worksheets should consider much better ways of doing this.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2019 22:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570069#M75223</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-06-29T22:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading all worksheets from XLS file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570107#M75224</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/213043"&gt;@Ramesh_165&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Yes I have close to 100 XLS workbook, and each workbook atleast has couple hundred worksheets. So looking for more of an automatic solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ramesh&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do the names of the sheets in the XLS files follow a pattern?&amp;nbsp; If so then you should be able to write a program to read all of the sheet by using the pattern to generate the sheet names.&amp;nbsp; If you have a pattern (or think there might be a pattern) but cannot figure out how to make the code post enough information to explain the pattern and you can get some help creating the code.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 15:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-all-worksheets-from-XLS-file/m-p/570107#M75224</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-06-30T15:12:06Z</dc:date>
    </item>
  </channel>
</rss>

