BookmarkSubscribeRSS Feed
vinod4842
Fluorite | Level 6

hi this is vinod 

proc import out=work.superstore1 datafile="C:\Users\user\Desktop\m\sample.xlsx"
dbms=excel replace;
run;

i am getting 

 

ERROR: Unable to open file C:\Users\user\Desktop\m\sample.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):
real time 0.05 seconds

 

plz tell me the answer is this correct

5 REPLIES 5
Reeza
Super User

The path to the file is incorrect. 

 

If you right click the file holding down SHIFT key you can copy the path to the file directly (COPY AS PATH) and use that in your import. Make sure the file isn't in use either as indicated, ie Excel is closed. 

Reeza
Super User

Also use DBMS = XLSX not EXCEL. 

ballardw
Super User

And if you are running in a server environment the path would be from the Server machine point of view and would not see your desktop.

Barkat
Pyrite | Level 9
I have a similar problem. I believe you found the problem. How to solve this?
Reeza
Super User
You upload your file to the server or you use the Copy Files task to upload it.
You can also do it via the GUI but via code sadly.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 6736 views
  • 2 likes
  • 4 in conversation