Help using Base SAS procedures

Problem Importing XLSX file using Proc Import

Reply
N/A
Posts: 0

Problem Importing XLSX file using Proc Import

I'm trying to use Proc Import to read an XLSX file into a SAS file, but I'm getting an error message:


16 proc import out=R110035.ssns_provided
17 datafile = 'S:\Requests\2011 Requests\1101\R110035\Misc\From Client.xlsx'
18 dbms = EXCEL replace;
19 run;

ERROR: Unable to open file S:\Requests\2011 Requests\1101\R110035\Misc\From Client.xlsx. It
does not exist or it is already opened exclusively by another user, or you need
permission to view its data.

Am I using the right DBMS option? Is there some other problem?
Thanks,
Jeff
Frequent Contributor
Posts: 102

Re: Problem Importing XLSX file using Proc Import

Do have the file open in Excel? That can cause this error.
SAS Super FREQ
Posts: 8,743

Re: Problem Importing XLSX file using Proc Import

Also, these notes are relevant:
http://support.sas.com/kb/32/455.html
http://support.sas.com/kb/38/535.html
http://support.sas.com/kb/32/862.html

And this documentation shows which versions of Excel can be read with which versions of SAS on various platforms (32 bit vs 64 bit):
http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/viewer.htm#a003094743.htm

cynthia
Super User
Posts: 9,687

Re: Problem Importing XLSX file using Proc Import

Hi.
proc import is not supported the XLSX file which is file above Office2007.
If you want to import these files , one way is to use ' libname ' statement.

[pre]
libname exce excel 'c:\temp\from.xlsx';
proc sql ;
create table r11 as
select *
from exce.sheet1;
quit;
[/pre]


Not tested code.


Ksharp
Ask a Question
Discussion stats
  • 3 replies
  • 10736 views
  • 1 like
  • 4 in conversation