<?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 Microsoft Excel Data with SAS/ACCESS LIBNAME statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536693#M147520</link>
    <description>&lt;P&gt;Your log is incomplete, as we can't see the log of the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are your settings for options validvarname and validmemname?&lt;/P&gt;</description>
    <pubDate>Tue, 19 Feb 2019 11:25:21 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-02-19T11:25:21Z</dc:date>
    <item>
      <title>Reading Microsoft Excel Data with SAS/ACCESS LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536692#M147519</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to read excel files in SAS using&amp;nbsp;SAS/ACCESS LIBNAME statement. I have checked the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;proc setinit; run; --&amp;gt; I have&amp;nbsp;SAS/ACCESS Interface to PC Files&lt;/LI&gt;
&lt;LI&gt;I am running SAS 9.4 with Microsoft Excel 2016&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I use the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname results xlsx "C:\Users\My Files\myfile.xlsx";

data work.test;   
set results.'Sheet1'n;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am getting the following on the SAS Log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;331  libname results xlsx "C:\Users\Documents\My Files\myfile.xlsx";
NOTE: Libref RESULTS was successfully assigned as follows:
      Engine:        XLSX
      Physical Name: C:\Users\My Files\myfile.xlsx
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And below is the remaining SAS log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;347  proc contents data=results._all_;

WARNING: No matching members in directory.
NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.05 seconds
      cpu time            0.00 seconds


348  data work.test;
349  set results.'Sheet1'n;
ERROR: Error opening XLSX file -&amp;gt; C:\Users\Documents\My SAS Files\myfile.xlsx .  It is
either not an Excel spreadsheet or it is damaged.   Error code=80001019
Requested Input File Is Invalid
ERROR: File RESULTS.Sheet1.DATA does not exist.
350  run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.03 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the library results is empty. I have looked at the community for a similar issue but could not find anything.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help on that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 11:31:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536692#M147519</guid>
      <dc:creator>Zatere</dc:creator>
      <dc:date>2019-02-19T11:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Microsoft Excel Data with SAS/ACCESS LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536693#M147520</link>
      <description>&lt;P&gt;Your log is incomplete, as we can't see the log of the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are your settings for options validvarname and validmemname?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 11:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536693#M147520</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-19T11:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Microsoft Excel Data with SAS/ACCESS LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536694#M147521</link>
      <description>Hi, I edited my original post. I am not quite sure about "What are your settings for options validvarname and validmemname?". Thanks</description>
      <pubDate>Tue, 19 Feb 2019 11:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536694#M147521</guid>
      <dc:creator>Zatere</dc:creator>
      <dc:date>2019-02-19T11:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Microsoft Excel Data with SAS/ACCESS LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536696#M147522</link>
      <description>&lt;P&gt;This is your clue:&lt;/P&gt;
&lt;PRE&gt;ERROR: Error opening XLSX file -&amp;gt; C:\Users\Documents\My SAS Files\myfile.xlsx .  It is
either not an Excel spreadsheet or it is damaged.   Error code=80001019
Requested Input File Is Invalid&lt;/PRE&gt;
&lt;P&gt;The file is not recognized by SAS as a file according to the XLSX format. It might be that someone cheated on you and gave you a classic XLS file with a wrong extension, or something different altogether which is opened by Excel as a spreadsheet (think csv).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or the file is simply still opened (or thinks it is) by Excel, see &lt;A href="https://blogs.sas.com/content/sasdummy/2014/09/24/proc-import-xlsx-error/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/2014/09/24/proc-import-xlsx-error/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This link is the first that turns up on a google search for "Error code=80001019", see Maxim 6.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 11:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536696#M147522</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-19T11:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Microsoft Excel Data with SAS/ACCESS LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536697#M147523</link>
      <description>&lt;P&gt;And please don't edit previous posts with new information, as that does not trigger an email notification. Adding a new message to a thread does so automatically.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 11:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536697#M147523</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-19T11:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Microsoft Excel Data with SAS/ACCESS LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536698#M147524</link>
      <description>&lt;P&gt;Yes indeed my file was opened in another application! Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 11:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Microsoft-Excel-Data-with-SAS-ACCESS-LIBNAME-statement/m-p/536698#M147524</guid>
      <dc:creator>Zatere</dc:creator>
      <dc:date>2019-02-19T11:45:39Z</dc:date>
    </item>
  </channel>
</rss>

