/* Read an Excel Spreadsheet using PROC IMPORT */ FILENAME REFFILE '/home/davidhitchcock/sasuser.v94/Copy of McEntire ANG.xlsx'; /* ... or whatever directory the excel file is stored in */ PROC IMPORT DATAFILE=REFFILE DBMS=XLSX /* Common choices for this option are XLS, XLSX, or EXCEL */ OUT=rainAug95; GETNAMES=YES; /* This assumes the variable names are in the first row of the spreadsheet */ SHEET='August 1995'; /* Specifies which sheet to read */ run; PROC PRINT DATA=rainAug95; TITLE 'August 1995 rain data'; run; PROC IMPORT DATAFILE=REFFILE DBMS=XLSX OUT=rainMay03; GETNAMES=YES; /* This assumes the variable names are in the first row of the spreadsheet */ RANGE="May 2003$A1:E22"; /*Specifies reading only a range of cells in spreadsheet */ run; PROC PRINT DATA=rainMay03; TITLE 'May 2003 rain data'; run;