<?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: Import data from XLS in SAS OnDemand for Academics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286579#M58797</link>
    <description>&lt;P&gt;Can you save it as XLSX and then use DBMS = XLSX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 23 Jul 2016 14:38:05 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-23T14:38:05Z</dc:date>
    <item>
      <title>Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286571#M58794</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS and I am trying to import an XLS in SAS and I can't seem to figure it out ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the following statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname myXLS '/home/path_to_file/my_content/Class_Cars.xls';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I get the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Library MYXLS is not in a valid format for access method RANDOM.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me out?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 13:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286571#M58794</guid>
      <dc:creator>_SAS_</dc:creator>
      <dc:date>2016-07-23T13:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286572#M58795</link>
      <description>&lt;P&gt;Add the keyword excel between libname and path?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does Proc Import work?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 13:37:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286572#M58795</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-23T13:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286575#M58796</link>
      <description>&lt;P&gt;Hi and thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myXLS excel '/home/path_to_file/my_content/Class_Cars.xls';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I get the following error message&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: The EXCEL engine cannot be found.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I use&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import 
			out=work.Class_Cars
			datafile='/home/path_to_file/my_content/Class_Cars.xls'
			dbms=excel replace;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I get the error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: DBMS type EXCEL not valid for import.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you know if we are allowed to work with XLS in the SAS OnDemand for Academics?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 14:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286575#M58796</guid>
      <dc:creator>_SAS_</dc:creator>
      <dc:date>2016-07-23T14:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286579#M58797</link>
      <description>&lt;P&gt;Can you save it as XLSX and then use DBMS = XLSX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 14:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286579#M58797</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-23T14:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286600#M58804</link>
      <description>With SAS OnDemand for Academics, I am not sure that the LIBNAME engine method will work or DBMS=EXCEL. I think the only 2 possibilities are PROC IMPORT/EXPORT with DBMS=XLS or XLSX.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Sat, 23 Jul 2016 19:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286600#M58804</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-07-23T19:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286688#M58843</link>
      <description>&lt;P&gt;Dear Reeza and Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution you proposed worked perfectly so I am posting it here for others that might need it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import 
			out=work.Class_Cars
			datafile='/home/path_to_file/my_content/Class_Cars.xlsx'
			dbms=xlsx replace;
	sheet='Class';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However you gave me another idea with the libname so I tried the following libname statement that actually worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myXLS xlsx '/home/path_to_file/my_content/Class_Cars.xlsx';

data work.Cars;
	set myXLS."Class$"n;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The strange thing is that when I run the code, the libname is assigned but the 2nd clause gives me the error that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Couldn't find range or sheet in spreadsheet
ERROR: File MYXLS.'Class$'n.DATA does not exist.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Do you have any idea why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286688#M58843</guid>
      <dc:creator>_SAS_</dc:creator>
      <dc:date>2016-07-24T18:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286690#M58845</link>
      <description>&lt;P&gt;What do you see when you navigate to the myxls library in the Library tab?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post an image of that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But basically the name should be the same as it is when you navigate to the library.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:37:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286690#M58845</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-24T18:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286698#M58849</link>
      <description>&lt;P&gt;I found it out based on navigating the library. I should have used the code without "$". Now it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.Cars;
	set myXLS."Class"n;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you for all your help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286698#M58849</guid>
      <dc:creator>_SAS_</dc:creator>
      <dc:date>2016-07-24T18:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from XLS in SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286703#M58854</link>
      <description>&lt;P&gt;This should work as well, you don't need the literal (n) specification.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.Cars;
	set myXLS.Class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Jul 2016 19:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-XLS-in-SAS-OnDemand-for-Academics/m-p/286703#M58854</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-24T19:35:38Z</dc:date>
    </item>
  </channel>
</rss>

