Page 93 - SAS_manual
P. 93
5) The Import Wizard - Select table dialog box gives you a drop-down list of worksheets or tables to
read. From the drop-down list, select the table that you want to read.
6) Now select the location to store the Excel worksheet in a SAS data set. Choose the SAS libref in
which you want to store the SAS data set. If you want the data set to be removed after you exit
SAS, select the default WORK library. If you want the data set to remain after you exit SAS, then
select another library, such as SASUSER. If the SAS data set does not exist, enter the name in the
Member field of the panel. If the SAS data set already exists, choose the member to replace and
click Next.
7) The next dialog box, Import Wizard - Create SAS statements, enables you to create your own
SAS PROC IMPORT code. You can do either of two things: a) Enter the full location of where you
want to store the SAS code.
For run the code :Proc print data=College;run;
2) PROC IMPORT
Proc import datafile=”location/file name”
Dbmas=excel
Out= new data set name
Replace;
Run;
Proc print data=new data set name;
Run;
If specific worksheet we want then we have to write “SHEET=SHEET_NAME” . By default it will show only
st
1 sheet. If only specific range of integer is required then we have to write “RANGE=MENTION THE
st
RANGE”. If you want to take the 1 line as heading then use “GETNAME=YES”.
Program: 7.41
SAS HANDBOOK | VISIT:: http://nikhilanalytics.com 93