Posted By

webonomic on 04/01/08


Tagged

excel convert dataset


Versions (?)

Convert Excel to SAS Dataset


 / Published in: SAS
 

URL: http://jaredprins.squarespace.com/blog/2008/4/1/convert-excel-to-sas-dataset.html

  1. PROC IMPORT DATAFILE="C:\folder\project\file.xls"
  2. OUT=mydata
  3. DBMS=excel2002 REPLACE;
  4. SHEET="MySheetName";
  5. GETNAMES=yes; * variable names are in row 1 ;
  6. RANGE="MySheetName$A1:P2582"; * omit if you want to read the entire worksheet;
  7. MIXED=YES; * V. 9: converts numerical values mixed in with character data into a variable with all character values;
  8. SCANTEXT=yes; * V. 9 only;
  9. USEDATE=no; * V. 9 only - read with date format only (note date-time);
  10. SCANTIME=no; * V. 9 only;
  11. DBSASLABEL= none; * V. 9 only;
  12. RUN;

Report this snippet  

You need to login to post a comment.