<?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: Column names using libname with Excel in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82404#M7956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS BASE you then need to specify the options to use the datasets from EG. Then to reference the variable, say sample id 1 you quote it and put an n as I indicated earlier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options validvarname=any;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;sample_id1='Sample ID 1'n;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Mar 2013 17:06:43 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-03-20T17:06:43Z</dc:date>
    <item>
      <title>Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82398#M7950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to import an excel file using libname on EG. It works fine, I can connect to the file and the using a data step I can just create a table. However, it creates SAS data sets with columns names that do not comply to SAS naming conventions. I get columns with names like 'sample ID 1'. How am I suppose to use these variable names in a SAS code?&lt;/P&gt;&lt;P&gt;I am currently moving from display manager to EG and I am not how to solve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Romain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 00:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82398#M7950</guid>
      <dc:creator>mrom34</dc:creator>
      <dc:date>2013-03-20T00:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82399#M7951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;'sample ID 1'&lt;/SPAN&gt; you have mentioned probably are just labels. The actual name is more likely to be &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;'sample_ID_1'. You can run proc content to confirm or just double click the column name after you have the table opened up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 01:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82399#M7951</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-03-20T01:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82400#M7952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the SAS option: options validvarname = V7; It will ensure that your libname translates your Excel columns to SAS columns. The default for EG is validvarname = ANY, which produces the symptoms you are seeing.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 02:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82400#M7952</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2013-03-20T02:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82401#M7953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can refer to them as 'Sample ID 1'n or try changing the options to get a valid SAS var name. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 02:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82401#M7953</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-03-20T02:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82402#M7954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestion. &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;options validvarname = V7&lt;/SPAN&gt; seems to work but it renames the columns _col0,_col1,_col2. I wish it&amp;nbsp; would just replace the blanks with underscore.&lt;/P&gt;&lt;P&gt;I still don't know how I can use a data set where the column name is 'Sample ID 1' ( I checked with proc content and it is actually the variable name). these data sets cannot be opened with SAS base&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 16:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82402#M7954</guid>
      <dc:creator>mrom34</dc:creator>
      <dc:date>2013-03-20T16:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82403#M7955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay I think I found the solution, I just use this option: options validmemname=extend;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 16:53:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82403#M7955</guid>
      <dc:creator>mrom34</dc:creator>
      <dc:date>2013-03-20T16:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Column names using libname with Excel</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82404#M7956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS BASE you then need to specify the options to use the datasets from EG. Then to reference the variable, say sample id 1 you quote it and put an n as I indicated earlier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options validvarname=any;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;sample_id1='Sample ID 1'n;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 17:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Column-names-using-libname-with-Excel/m-p/82404#M7956</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-03-20T17:06:43Z</dc:date>
    </item>
  </channel>
</rss>

