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.