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.
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!
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.
Ready to level-up your skills? Choose your own adventure.