<?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: Difficulty referring to variables in excel in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598619#M8196</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285603"&gt;@u41125093&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am i doing wrong?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;snark&amp;gt; You're using Excel &amp;lt;/snark&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Frankly, what happens is that you have strings in your Excel header line that do not meet the conditions for valid SAS names.&lt;/P&gt;
&lt;P&gt;Valid SAS names have a maximum length of 32, contain only letters, digits or underlines, and do not start with a digit.&lt;/P&gt;
&lt;P&gt;Since SAS 8 or so, non-standard names can be used with a so-called name literal: "some nonstandard name"n&lt;/P&gt;
&lt;P&gt;This only works if&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you have several avenues:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;change the header lines in Excel to contain valid SAS names (preferred), and rerun the import&lt;/LI&gt;
&lt;LI&gt;if validvarname=any is set, the dataset was probably imported with the names as they are, so try "&lt;SPAN&gt;Number of pulls vacuum"n&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;if validvarname=v7 is set, inspect your dataset how the name was imported&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 23 Oct 2019 06:39:37 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-10-23T06:39:37Z</dc:date>
    <item>
      <title>Difficulty referring to variables in excel</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598618#M8195</link>
      <description>&lt;P&gt;Hey, i'm having trouble referring to variables in excel&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC UNIVARIATE DATA=SGH;&lt;BR /&gt;Var Number_of_pulls_vacuum;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error statement is:&lt;/P&gt;&lt;DIV class="sasSource"&gt;100 PROC UNIVARIATE DATA=SGH;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;101 Var Number_of_pulls_vacuum;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Variable NUMBER_OF_PULLS_VACUUM not found.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;102 Run;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The title of the variable in excel and SAS is Number of pulls vacuum&lt;/P&gt;&lt;P&gt;What am i doing wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 06:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598618#M8195</guid>
      <dc:creator>u41125093</dc:creator>
      <dc:date>2019-10-23T06:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty referring to variables in excel</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598619#M8196</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285603"&gt;@u41125093&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What am i doing wrong?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;lt;snark&amp;gt; You're using Excel &amp;lt;/snark&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Frankly, what happens is that you have strings in your Excel header line that do not meet the conditions for valid SAS names.&lt;/P&gt;
&lt;P&gt;Valid SAS names have a maximum length of 32, contain only letters, digits or underlines, and do not start with a digit.&lt;/P&gt;
&lt;P&gt;Since SAS 8 or so, non-standard names can be used with a so-called name literal: "some nonstandard name"n&lt;/P&gt;
&lt;P&gt;This only works if&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you have several avenues:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;change the header lines in Excel to contain valid SAS names (preferred), and rerun the import&lt;/LI&gt;
&lt;LI&gt;if validvarname=any is set, the dataset was probably imported with the names as they are, so try "&lt;SPAN&gt;Number of pulls vacuum"n&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;if validvarname=v7 is set, inspect your dataset how the name was imported&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 23 Oct 2019 06:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598619#M8196</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-23T06:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulty referring to variables in excel</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598729#M8201</link>
      <description>&lt;P&gt;What does the output of&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc contents data=sgh;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or show the code you are using to connect to Excel.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 14:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Difficulty-referring-to-variables-in-excel/m-p/598729#M8201</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-23T14:40:47Z</dc:date>
    </item>
  </channel>
</rss>

