Hi,
I'm trying to use proc import as below and I'm getting an error. I'm guess its because i do not have SAS/ACCESS interface to PC files.
PROC IMPORT
DATAFILE='/uhome/snoone/callrecording.xls'
DBMS=EXCEL
OUT=x
REPLACE; run;
ERROR: DBMS type EXCEL not valid for import.
What is an alternative way of importing excel file?
I don't recall if DBMS=XLS requires access to PC Files, you could try that. Otherwise you're probably out of luck for XLS. XLSX can be read in as a text file, given some work (it's a zipped XML file), but odds are it's cheaper to license Access to PC Files.
If you don't have access to PC files you may be best off with saving the file to CSV. Then you can either write Proc Import for that file or use the wizards.
One big, at least in my opinion, of using the CSV approach is that Proc Import generates basic datastep code, look in the log or use F4 key in the editor to recall. The code can be modified to control variable types, informats and formats including using custom informats/formats. I also usually add labels to the code.
This was posted to SAS L, perhaps you can follow up with them?
If you're referring to Gady's post, that very likely only would work on XLSX (I wrote roughly the same thing a year ago, and FriedEgg wrote a simpler routine as well). XLSX is an xml file, XLS may be a binary file (it also may be a very differently structured XML file).
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.