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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 941 views
  • 0 likes
  • 3 in conversation