<?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: proc import from excel with variable names with spaces in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165730#M12751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Are you sure that's what's happening? SAS has variable labels and names, the labels may have spaces but the names won't.&lt;/P&gt;&lt;P&gt;2. Look at the validvarname option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option validvarname=ANY - this allows spaces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTION VALIDVARNAME=V7 - will allow the standard SAS naming convention, i.e. using underscores.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the option in EG if you require and re-importing will allow the names to be imported as you expect.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p124dqdk8zoqu3n1r4nsfqu5vx52.htm" title="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p124dqdk8zoqu3n1r4nsfqu5vx52.htm"&gt;SAS(R) 9.3 System Options: Reference, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Dec 2014 20:13:30 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-12-30T20:13:30Z</dc:date>
    <item>
      <title>proc import from excel with variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165729#M12750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everybody,&lt;/P&gt;&lt;P&gt;I am importing huge file ( so many columns) and run below query.&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT=WORK.test &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;DATAFILE="~\data.XLS"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DBMS=XLS REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SHEET="Sheet1";&lt;/P&gt;&lt;P&gt;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that my column names has spaces in final sas dataset also. For example &lt;EM&gt;'var one&lt;/EM&gt;' came as &lt;EM&gt;'var one&lt;/EM&gt;' but I was expecting it will come as &lt;EM&gt;var_one&lt;/EM&gt;. I am wondering if there is a way to make sure that all variables are named as SAS convention as we create tables using file from Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I can do it using file&amp;gt;&amp;gt;import data and clicking in rename variables as sas convention in EG but I am looking if it can be done using proc import procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 20:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165729#M12750</guid>
      <dc:creator>learner_sas</dc:creator>
      <dc:date>2014-12-30T20:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc import from excel with variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165730#M12751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Are you sure that's what's happening? SAS has variable labels and names, the labels may have spaces but the names won't.&lt;/P&gt;&lt;P&gt;2. Look at the validvarname option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;option validvarname=ANY - this allows spaces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTION VALIDVARNAME=V7 - will allow the standard SAS naming convention, i.e. using underscores.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the option in EG if you require and re-importing will allow the names to be imported as you expect.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p124dqdk8zoqu3n1r4nsfqu5vx52.htm" title="http://support.sas.com/documentation/cdl/en/lesysoptsref/64892/HTML/default/viewer.htm#p124dqdk8zoqu3n1r4nsfqu5vx52.htm"&gt;SAS(R) 9.3 System Options: Reference, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 20:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165730#M12751</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-12-30T20:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc import from excel with variable names with spaces</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165731#M12752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you @reeza. It worked. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 20:28:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-import-from-excel-with-variable-names-with-spaces/m-p/165731#M12752</guid>
      <dc:creator>learner_sas</dc:creator>
      <dc:date>2014-12-30T20:28:03Z</dc:date>
    </item>
  </channel>
</rss>

