11-20-2013 11:27 AM
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.
ERROR: DBMS type EXCEL not valid for import.
What is an alternative way of importing excel file?
11-20-2013 01:06 PM
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.
11-20-2013 01:21 PM
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.
11-20-2013 01:35 PM
This was posted to SAS L, perhaps you can follow up with them?
11-20-2013 01:38 PM
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).