/ Published in: SAS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
PROC IMPORT DATAFILE="C:\folder\project\file.xls" OUT=mydata DBMS=excel2002 REPLACE; SHEET="MySheetName"; GETNAMES=yes; * variable names are in row 1 ; RANGE="MySheetName$A1:P2582"; * omit if you want to read the entire worksheet; MIXED=YES; * V. 9: converts numerical values mixed in with character data into a variable with all character values; SCANTEXT=yes; * V. 9 only; USEDATE=no; * V. 9 only - read with date format only (note date-time); SCANTIME=no; * V. 9 only; DBSASLABEL= none; * V. 9 only; RUN;
URL: http://jaredprins.squarespace.com/blog/2008/4/1/convert-excel-to-sas-dataset.html