<?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: Problem with libname excel to import xlsm file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405542#M66988</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13635"&gt;@Vince_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I 've tried. The result is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Internal error: unable to communicate with PC Files Server process.&lt;BR /&gt;ERROR: Error in the LIBNAME statement&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 14:05:15 GMT</pubDate>
    <dc:creator>chris2377</dc:creator>
    <dc:date>2017-10-19T14:05:15Z</dc:date>
    <item>
      <title>Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405226#M66964</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to import the xlsm file using libname excel statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname test excel "C:\...\test_file.xlsm";
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The test file is very simple, it has 2 variables and 2 observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the code, SAS creates the library test as expected, but I cannot open the dataset with data taht is inside. It says that the table does not exist or it cannot be displayed. Why?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 14:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405226#M66964</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2017-10-18T14:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405254#M66965</link>
      <description>What is the name of the sheet?</description>
      <pubDate>Wed, 18 Oct 2017 15:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405254#M66965</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-10-18T15:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405290#M66972</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/43025"&gt;@error_prone&lt;/a&gt;&amp;nbsp;Default name ("Sheet1"). I've tried to import other files where sheets are named differently. Every time, datasets appear in the library but I cannot open them&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 17:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405290#M66972</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2017-10-18T17:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405376#M66980</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Try the PCFILES engine:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname indata pcfiles path='C:\temp\myfile.xlsm' access=read;

options validvarname=any validmemname=extend;

proc contents data=indata._all_; run; quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 22:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405376#M66980</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2017-10-18T22:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405542#M66988</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13635"&gt;@Vince_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I 've tried. The result is:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Internal error: unable to communicate with PC Files Server process.&lt;BR /&gt;ERROR: Error in the LIBNAME statement&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 14:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405542#M66988</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2017-10-19T14:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405545#M66989</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I should have asked earlier - What operating system is SAS running on, and what version of SAS are you using?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;On UNIX systems the SAS PC Files Server needs to be started and running on a Windows machine.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 14:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405545#M66989</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2017-10-19T14:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405614#M66996</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13635"&gt;@Vince_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sas 9.4 M3 + Windows 7 64 bit&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 15:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405614#M66996</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2017-10-19T15:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405633#M66997</link>
      <description>&lt;P&gt;Afaik you still need the PC Files service, assuming that MS Office is 32bit.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 16:22:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405633#M66997</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-10-19T16:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405645#M66999</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;It appears that the PC Files Server isn't installed.&amp;nbsp; If it's installed then there should be an item under the SAS start menu named "PC File Server".&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I don't think there is a bitness mismatch because the original post indicated that the library was assigned.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Save the attached "Book1.xlsm.txt" file on your system and then rename it to remove the &lt;FONT face="courier new,courier"&gt;.txt&lt;/FONT&gt; extension (forum software disallows XLSM files).&amp;nbsp; Modify the code below to specify the correct file path, and then run the code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any validmemname=extend;

libname indata excel 'path-to-file\Book1.xlsm' access=read;

title 'EXCEL Engine';

proc contents data=indata._all_; run; quit;

proc print data=indata.'Sheet1$'n; run; quit;


libname indata xlsx 'path-to-file\Book1.xlsm' access=read;

title 'XLSX Engine';

proc contents data=indata._all_; run; quit;

proc print data=indata.Sheet1; run; quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;FONT face="verdana,geneva"&gt;PROC CONTENTS reports these table names for the EXCEL engine:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INDATA.'Sheet1$'n&lt;BR /&gt;INDATA.'Sheet2$'n&lt;BR /&gt;INDATA.'Sheet3$'n&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;and these for the XLSX engine:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;INDATA.SHEET1&lt;BR /&gt;INDATA.SHEET2&lt;BR /&gt;INDATA.SHEET3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;You must use the names that the respective engine expects (case does not matter in this instance).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Does that help?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 16:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/405645#M66999</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2017-10-19T16:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with libname excel to import xlsm file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/409057#M67146</link>
      <description>Thanks, it works now.</description>
      <pubDate>Tue, 31 Oct 2017 11:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-libname-excel-to-import-xlsm-file/m-p/409057#M67146</guid>
      <dc:creator>chris2377</dc:creator>
      <dc:date>2017-10-31T11:14:05Z</dc:date>
    </item>
  </channel>
</rss>

