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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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