Unable to import excel file

Reply
Occasional Contributor
Posts: 6

Unable to import excel file

Hi. I am trying to import excel file, but gives an error.

'Unable to open file E:\SAS\smoking project\ae.xls. It does not exist or it is already
opened exclusively by another user, or you need permission to view its data.'

 

the syntax was

proc import out= AE
datafile="E:\SAS\smoking project\ae.xls"
dbms=excel replace;
sheet="ae";
run;

Esteemed Advisor
Esteemed Advisor
Posts: 7,189

Re: Unable to import excel file

What software are you running, e.g. is is SAS University Edition or Enterprise Guide or something?  SAS UE does not look at loacl drives for instance, and a network install of SAS might not see or have access to a drive you can see on your local machine.

 

Does SAS see this "E" drive?  Does it have permission to access this "E" drive?  

Occasional Contributor
Posts: 6

Re: Unable to import excel file

I am using SAS 9.2. Earlier, when I used to have same kind of problem, I used change the location of source file. For ex.C:\ didnot have permission to access, so changing it to E:\ would help me.

But even if i try same way, its not working this time.

Grand Advisor
Posts: 17,294

Re: Unable to import excel file

Post the code/log please

Occasional Contributor
Posts: 6

Re: Unable to import excel file


21 proc import out= AE
22 datafile="E:\SAS\smoking project\ae.xls"
23 dbms=excel replace;
24 sheet="ae";
25 run;

ERROR: Unable to open file E:\SAS\smoking project\ae.xls. It does not exist or it is already
opened exclusively by another user, or you need permission to view its data.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):

Grand Advisor
Posts: 10,192

Re: Unable to import excel file

What happens if you try to open that file with Excel?

 

If the file is currently open in Excel that is the cause " already opened exclusively " could be you having it open.

Ask a Question
Discussion stats
  • 5 replies
  • 372 views
  • 0 likes
  • 4 in conversation