Hi all,
I'm imported an XLSx file into SAS University edition. For some reason three of the numeric variables have been classified by SAS as character variables, even though no observations include any characters. Can anyone tell me how to correct this?
Here is my import code:
PROC IMPORT DATAFILE="/folders/myfolders/Med.xlsx"
OUT=WORK.med2
DBMS=XLSX
REPLACE;
TIA for any help!
try :
mixed=yes
Hi thanks very much for your help-
I looked closer at the entries for those variables in excel and saw that they each have one or two that were somehow entered as text. I will try to change them to numbers and repeat the import. Missing data in the Excel file are blank cells, for those three variables as well as for the seven other variables that sas correctly labeled as numeric.
thanks again! after i corrected those cells the import worked and all numeric variables were classified as numeric.
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.