<?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: Libname xls in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684212#M207311</link>
    <description>Hello Kurt,&lt;BR /&gt;&lt;BR /&gt;This code is working:&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;options validvarname=any;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;libname xl XLSX "\\XXX\TousIsin.xlsm";&lt;BR /&gt;&lt;BR /&gt;data isin;&lt;BR /&gt;set xl.'VALEURS$B2:50'n;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BUT when I replace B2:50 by range NAME:&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;data isin;&lt;BR /&gt;set xl.'VALEURS$test'n;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;My code doesn'y work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
    <pubDate>Wed, 16 Sep 2020 13:50:51 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2020-09-16T13:50:51Z</dc:date>
    <item>
      <title>Libname xls for xlm: import the range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684163#M207301</link>
      <description>&lt;P&gt;Hello Experts,&lt;BR /&gt;Is it possible to access the range in xlsm file using Libname xls?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is working:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options validvarname=any;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;libname xl XLSX "\\XXX\TousIsin.xlsm";&lt;/P&gt;
&lt;P&gt;data isin;&lt;BR /&gt;set xl.'VALEURS$B2:50'n;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BUT when I replace&amp;nbsp;B2:50 by range NAME:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data isin;&lt;BR /&gt;set xl.'VALEURS$test'n;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code doesn'y work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 13:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684163#M207301</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-09-16T13:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684177#M207307</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Seems like you've tested it.&lt;/P&gt;
&lt;P&gt;AFAIK you'll need the libname excel&lt;/P&gt;
&lt;PRE&gt;libname xlfile excel "your xlsm file" access=read;
proc print data=sashelp.vtable (keep=libname memname memtype);
where libname eq 'XLFILE';
run;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Sep 2020 12:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684177#M207307</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2020-09-16T12:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684205#M207309</link>
      <description>Thank you,&lt;BR /&gt;It doesn't work:&lt;BR /&gt;ERROR: Connect: Classe non enregistrée&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;&lt;BR /&gt;I would like to import the range from xlsm file.</description>
      <pubDate>Wed, 16 Sep 2020 13:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684205#M207309</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-09-16T13:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684211#M207310</link>
      <description>&lt;P&gt;Did LIBNAME XLS (which you previously mentioned) actually work? This looks as if you do not have ACCESS to PC Files licensed or installed, or are running SAS on a non-Windows platform.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 13:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684211#M207310</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-16T13:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684212#M207311</link>
      <description>Hello Kurt,&lt;BR /&gt;&lt;BR /&gt;This code is working:&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;options validvarname=any;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;libname xl XLSX "\\XXX\TousIsin.xlsm";&lt;BR /&gt;&lt;BR /&gt;data isin;&lt;BR /&gt;set xl.'VALEURS$B2:50'n;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BUT when I replace B2:50 by range NAME:&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;data isin;&lt;BR /&gt;set xl.'VALEURS$test'n;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;My code doesn'y work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Wed, 16 Sep 2020 13:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684212#M207311</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-09-16T13:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684225#M207314</link>
      <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xl XLSX "\\XXX\TousIsin.xlsm";

proc sql;
select memname from dictionary.tables where libname = "XL";
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and look at the dataset names you get in the library.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 14:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684225#M207314</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-16T14:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684266#M207337</link>
      <description>Thank you, &lt;BR /&gt;I have the datasets with page name (the data by page), not by range.&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Sep 2020 15:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684266#M207337</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-09-16T15:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684308#M207355</link>
      <description>I mean that my ranges are named, I didn’t se tables by range.&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
      <pubDate>Wed, 16 Sep 2020 16:24:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684308#M207355</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-09-16T16:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684317#M207360</link>
      <description>&lt;P&gt;A little research revealed that the XLSX engine does not support named ranges, so you have (AFAIK) three options:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;use LIBNAME EXCEL. Works only on Windows, and SAS and Office (installed on the SAS host) must be of the same bitness (32/64)&lt;/LI&gt;
&lt;LI&gt;LIBNAME XLS, with the same restrictions regarding bitness (AFAIK)&lt;/LI&gt;
&lt;LI&gt;use the PC Files Server and the EXCELCS engine.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 16 Sep 2020 17:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684317#M207360</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-16T17:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684524#M207443</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it looks like you haven't SAS/ACCESS licensed.&lt;/P&gt;
&lt;P&gt;You could try with proc Import but I think it won't work neither since it listed in the SAS/ACCESS Interface to PC Files but I would give it a try.&lt;/P&gt;
&lt;PRE&gt;PROC IMPORT OUT= WORK.want 
            DATAFILE= "C:\fileWithNamedRanges.xlsm" 
            DBMS=EXCEL REPLACE;
            RANGE="range1"; 
            GETNAMES=YES;
            MIXED=YES;
            SCANTEXT=YES;
            USEDATE=YES;
            SCANTIME=YES;
RUN;&lt;/PRE&gt;
&lt;P&gt;If&amp;nbsp;none of the proposals&amp;nbsp;work, maybe you can use some vba code to export a named ranges to a new xlsx workbook and Import the data.&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;I wasn't aware that what you posted before actually works, so thanks for this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;libname xl XLSX "\\XXX\TousIsin.xlsm";
data isin;
set xl.'VALEURS$B2:50'n;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Sep 2020 09:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684524#M207443</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2020-09-17T09:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Libname xls</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684563#M207476</link>
      <description>&lt;P&gt;I'll recap what we know so far:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;from the path, your SAS runs on Windows&lt;/LI&gt;
&lt;LI&gt;you have ACCESS to PC Files licensed, as LIBNAME XLSX works&lt;/LI&gt;
&lt;LI&gt;LIBNAME EXCEL or XLS gets the "class not registered" error&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;You either have a the necessary ACE or JET engine not available, or a bitness problem. See this SAS Note for possible remedies:&amp;nbsp;&lt;A href="https://support.sas.com/kb/63/750.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/63/750.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 12:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-xls-for-xlm-import-the-range/m-p/684563#M207476</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-17T12:21:41Z</dc:date>
    </item>
  </channel>
</rss>

