Hi All,
I was using the point and click import feature in SAS to import an excel file and it gives me a message and says' connection failed' and 'error in libname' statement. I researched a bit and the information was for older versions of SAS. I use SAS 9.4. Also, the file I was trying to import is placed on a flash drive. Please let me know you suggestions.
Thanks.
The ERROR does not refer to the libname a "E:\test"; statement. There mus be another libname before that that causes the error.
This may be helpful for you:
37412 - Errors occur when you import Microsoft Excel or Microsoft Access files into SAS® 9.2
Basically, this is the message I am getting when I import an excel file
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement
Are you in SAS Foundation in Windows? And do you use the Import Wizard?
What is the version and type (file extension) of the Excel file?
Full code and log would help.
Looks like you try to use an access method for which you do not have the license and/or which is not installed.
What was the libname statement?
I remember something similar. EG imports the dataset, and moves it via FTP to a temp location on the server, from which SAS on the server copied it to my final library. There was a problem with access to the temp location, so the export failed, but the problem was difficult to trace and required some SAS expertise.
Tom
Thanks all for your input. I did use the import wizard. My excel file was on a flash drive.
For example the libname statement was:
libname a "E:\test";
The minute I start using the import wizard I get the message..connection failed and check log. My log looks like this...
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.
NOTE: Attachments for -3 reestablished for new parent.
NOTE: Import Cancelled.
1 libname a "E:\test";
NOTE: Libref A was successfully assigned as follows:
Engine: V9
Physical Name: E:\test
The ERROR does not refer to the libname a "E:\test"; statement. There mus be another libname before that that causes the error.
This may be helpful for you:
37412 - Errors occur when you import Microsoft Excel or Microsoft Access files into SAS® 9.2
Hi @KurtBremser..I don't have another libname before that caused the error. But, I do have 32 bit MS office and 64 bit SAS...so that might be the issue. Your links are helpful and second one might address the bit size issue. I just need the server name for that. Will keep you all posted. Thanks.
Hi @KurtBremser and all,
The problem with SAS import wizard was resolved. Turns out the SAS PC files server was 64 bit which did not match with my 32 bit Windows Office. So the PC files server was stopped, uninstalled and the SAS PC files server 32 bit was installed. Steps on this link were followed
SAS Downloads: SAS PC Files Server.
I still got an error after that...which is
ERROR: CLI error trying to establish connection: [Microsoft][ODBC Excel Driver] General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x490 Thread 0xbbc DBC 0x3bb7fdc Excel'. ERROR: Error in the LIBNAME statement
This error corresponded to a error number (40228) in SAS support which meant the Windows drivers were old and needed to be replaced. The following link helped correct the problem 40228 - "Volatile ACE DSN" errors occur when you import Microsot Excel files using the EXCELCS engin...
SAS provided technical support to resolve this issue. Here is the documentation for 9.4 PC files server http://support.sas.com/documentation/cdl/en/pcfsicg/67728/PDF/default/pcfsicg.pdf
Thanks !
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.