BookmarkSubscribeRSS Feed
etsfor
Calcite | Level 5

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?

 

2 REPLIES 2
SASKiwi
PROC Star

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.

Reeza
Super User

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?

 


 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1108 views
  • 0 likes
  • 3 in conversation