0 votes
in SAS by

PROC IMPORT is the SAS procedure used to read data from excel into SAS. This tutorial covers how to import excel data to SAS with PROC IMPORT. Loading excel data to SAS is one of the most common task of a SAS programmer / analyst. Most of the raw data files are saved in MS Excel so we need to take it to SAS for further analysis.

 

PROC IMPORT Syntax:

PROC IMPORT 
DATAFILE="filename"
OUT=SAS-data-set 
DBMS=identifier 
  REPLACE;
  SHEET="Sheet-name";
  GETNAMES=YES; 
  DATAROW=N;
  RANGE="range-name";
RUN;
1. DATAFILE= option tells SAS where to find the Excel file that you want to import  (Complete filename path).
For example : DATAFILE = "C:\Desktop\age.xls"
2. OUT= option tells SAS to create a dataset with any name of your choice. By default, the imported dataset is saved on WORK library (temporary library)    
 Examples :
i. OUT = Age .  In this statement, PROC IMPORT uses the WORK library. This implies OUT = Age is equivalent to OUT = Work.Age .
ii. <span style="border:0px; font-st

Related questions

+1 vote
+1 vote
asked Jun 11, 2020 in SAS by JackTerrance
+1 vote
0 votes
asked Jun 10, 2020 in SAS by JackTerrance
...