SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

SAS reading Excel

Reply
N/A
Posts: 0

SAS reading Excel

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
Super Contributor
Posts: 291

Re: SAS reading Excel

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.
Ask a Question
Discussion stats
  • 1 reply
  • 164 views
  • 0 likes
  • 2 in conversation