<?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: Using libname to read excel into SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774972#M246347</link>
    <description>&lt;P&gt;Try this. Using a non-standard SAS name means you have to specify a text string name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname have xlsx '\\client\c$\SAS\File.xlsx';
data need;
set have.'Sheet1$'n;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 Oct 2021 19:03:41 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2021-10-18T19:03:41Z</dc:date>
    <item>
      <title>Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774970#M246345</link>
      <description>&lt;P&gt;I'm using libname to read in excel into SAS&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname have xlsx '\\client\c$\SAS\File';
data need;
set have. 'Sheet1$';
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I'm receiving the following error&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Error: The value 'SHEET1$'n is not a valid SAS name.&lt;BR /&gt;&lt;BR /&gt;Error&amp;nbsp;22-322:&amp;nbsp;Syntax&amp;nbsp;error,&amp;nbsp;expecting&amp;nbsp;one&amp;nbsp;of&amp;nbsp;the&amp;nbsp;following:&amp;nbsp;a&amp;nbsp;name,&amp;nbsp;a&amp;nbsp;quoted&amp;nbsp;string,&amp;nbsp;;,&amp;nbsp;...&lt;BR /&gt;&lt;BR /&gt;Error&amp;nbsp;201-322:&amp;nbsp;The&amp;nbsp;option&amp;nbsp;is&amp;nbsp;not&amp;nbsp;recognized&amp;nbsp;and&amp;nbsp;will&amp;nbsp;be&amp;nbsp;ignored.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any thoughts? Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 18:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774970#M246345</guid>
      <dc:creator>aabbccwyt</dc:creator>
      <dc:date>2021-10-18T18:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774972#M246347</link>
      <description>&lt;P&gt;Try this. Using a non-standard SAS name means you have to specify a text string name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname have xlsx '\\client\c$\SAS\File.xlsx';
data need;
set have.'Sheet1$'n;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Oct 2021 19:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774972#M246347</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-18T19:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774975#M246348</link>
      <description>&lt;P&gt;Hi. Now it comes with an error&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: File HAVE.'Sheet1$'. DATA does not exist.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Oct 2021 19:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774975#M246348</guid>
      <dc:creator>aabbccwyt</dc:creator>
      <dc:date>2021-10-18T19:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774977#M246349</link>
      <description>Your path has to reference the XLSX file directly - including the extension. &lt;BR /&gt;&lt;BR /&gt;And you need to remove the spaces between the have and period.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Oct 2021 19:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774977#M246349</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-18T19:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774994#M246357</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292388"&gt;@aabbccwyt&lt;/a&gt;&amp;nbsp;And once you're libname is correct - something like...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;libname have xlsx '\\client\c$\SAS\myWorkBook.xlsx';&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... run a proc contents so you understand what names the tables get within SAS.&lt;/P&gt;
&lt;PRE&gt;proc contents data=have._all_;
run;quit;&lt;/PRE&gt;
&lt;P&gt;Any table or column name that doesn't comply with SAS naming standards must get addressed as SAS name literal within SAS code: &amp;lt;libref&amp;gt;.'table name'n&amp;nbsp; &amp;nbsp;(=table name in quotes and letter n after closing quote).&lt;/P&gt;
&lt;P&gt;If you use &lt;EM&gt;options validvarname=v7;&lt;/EM&gt; before the libname statement then SAS will replace all non compliant characters for column names with an underscore.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 02:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/774994#M246357</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-20T02:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/775011#M246362</link>
      <description>&lt;P&gt;If by TABLE NAME you mean the names of the SAS datasets in the library then the option to allow non-standard characters in those name&amp;nbsp;is VALIDMEMNAME.&amp;nbsp; The VALIDVARNAME option only controls the names allowed for variables (what you are calling COLUMNs).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set VALIDMEMNAME=EXTEND to work with sheets in the workbook that have spaces or other non-standard characters in them.&amp;nbsp; To turn it off set it back to VALIDMEMNAME=COMPAT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 22:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/775011#M246362</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-18T22:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using libname to read excel into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/775091#M246387</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any validmemname=extend;
libname x xlsx 'c:\temp\temp.xlsx';
proc copy in=x out=work;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Oct 2021 12:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-libname-to-read-excel-into-SAS/m-p/775091#M246387</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-19T12:27:08Z</dc:date>
    </item>
  </channel>
</rss>

