Hey, i'm having trouble referring to variables in excel
PROC UNIVARIATE DATA=SGH;
Var Number_of_pulls_vacuum;
Run;
The error statement is:
The title of the variable in excel and SAS is Number of pulls vacuum
What am i doing wrong?
@u41125093 wrote:
What am i doing wrong?
<snark> You're using Excel </snark>
Frankly, what happens is that you have strings in your Excel header line that do not meet the conditions for valid SAS names.
Valid SAS names have a maximum length of 32, contain only letters, digits or underlines, and do not start with a digit.
Since SAS 8 or so, non-standard names can be used with a so-called name literal: "some nonstandard name"n
This only works if
options validvarname=any;
is set.
So you have several avenues:
What does the output of
Proc contents data=sgh;
run;
look like?
Or show the code you are using to connect to Excel.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.