/* the following code reads the data in an excel file directly */ /* into a SAS data set */ /* there are many other ways, including via an intermediate .csv file */ proc import datafile='c:/philip/stat 401/donner.xls' out=donner replace; /* sheet='Sheet1'; */ /* by default SAS reads the first sheet in the workbook */ /* this is fine if there is only one sheet */ /* uncomment the sheet='name'; command to read a specific sheet from */ /* the work book */ /* you can use range=xxx; to read data from a specific range */ run; /* One idiosyncracy about proc import: it does not define the */ /* the last created data set (at least in version 9.0 */ /* so, you need to tell each subsequent proc to use that data set */ proc print data=donner; run;