07-17-2015 12:31 AM
Please can you suggest 4-5 ways of importing excel file into SAS 9.3
1. When i use proc import, SAS gives error related invalid dbms= option.
07-17-2015 04:57 AM
Note: - Use a valid dbms option? I.e. do you have SAS Access installed, are you using the correct dbms for you file type, here is the list of them:
That aside, I wouldn't recommend using:
a) Excel - this is not a good data transfer format. Use CSV, XML or any of the other proper structured data transfer formats
b) Proc import/export - these are guessing procedures. They guess what data you want to import. Use a proper data transfer format and write and explicit datastep import to import the data as you know it to be.
1) Datastep infile and inputs with CSV file. Most robust method.
2) libname xml
3) libname excel - limited to accessible data
4) proc import - guesswork
07-17-2015 12:10 PM
Please can you provide the exact code for importing using datastep and importing using proc import.
I will definitely look into the list of dbms types from the link you provided.
07-17-2015 01:31 PM
If you have to do it use XLSX file format and DBMS=XLSX.
To just get the first sheet use:
proc import file='myfile.xlsx' out=MYSAS dbms=xlsx;