BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have been reading Excel spreadsheets into SAS using the following code:

PROC IMPORT OUT=TORQTable1
DATAFILE= 'G:\NEG\Xxxxr - Xxxxxxxxx\TORQ Tables\TORQ Related Occs\torq11-1021.xls'
DBMS=EXCEL REPLACE;
GETNAMES=YES;
SHEET='Sheet3';
RUN;

This sometimes works but frequently I get the following error message:

ERROR: Connect: The Microsoft Jet database engine cannot open the file
''. It is already opened exclusively by another user, or you
need permission to view its data.
ERROR: Error in the LIBNAME statement.
Connection Failed. See log for details.

So I added an X statement:

X "'G:\NEG\Xxxxr - Xxxxxxxxx\TORQ Tables\TORQ Related Occs\torq11-1021.xls'";

This works sometimes but I sometimes also get the aove error.

I don't think that the table is opened by someone else because it also happens on files on my C: drive that I know are
closed. (With the X statement, the table always opens on my desktop before getting the error message.

Any ideas?

Thanks
BP
1 REPLY 1
Bill
Quartz | Level 8
go to support.sas and search for

ERROR: Connect: The Microsoft Jet database engine cannot open the file

One of the responses may well apply to your situation.

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!

Discussion stats
  • 1 reply
  • 686 views
  • 0 likes
  • 2 in conversation