I am using a SAS Studio On Demand for Academics and upload a Excel file to File and Folder. The Excel file has some numerical and categorical variable (using numbers).
When I am create a SAS Table by using:
Options validvarname=v7;
Libname Cedrela xlsx "path....";
My SAS Table consider all variables as numeric variable. Moreover, when I am try to build a Categorical plot (e.g. box plot) by Task and Utilities its not possible because all variable is a numeric.
My I use a Proc step to format the variable or at Excel is possible do classify the variable?
From experience I've found that if you do a "Data / Text to Columns" on the Excel columns you want treated as text / categorical, then reread the sheet into SAS that should fix your problem.
Is it possible you have that backwards?
Variables to be summarized mathematically must be numeric variables. Variables to be used as categories can be either numeric or character and it wouldn't matter to the procedure.
Please provide more details about the issues you're encountering.
A box plot would require at least one continuous variable which should be numeric. You could have multiple plots then split by category which could be either a character or numeric variable AFAIK.
@etsfor wrote:
I am using a SAS Studio On Demand for Academics and upload a Excel file to File and Folder. The Excel file has some numerical and categorical variable (using numbers).
When I am create a SAS Table by using:
Options validvarname=v7;
Libname Cedrela xlsx "path....";
My SAS Table consider all variables as numeric variable. Moreover, when I am try to build a Categorical plot (e.g. box plot) by Task and Utilities its not possible because all variable is a numeric.
My I use a Proc step to format the variable or at Excel is possible do classify the variable?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.