Help using Base SAS procedures

SAS 9.3 import excel file

Reply
New Contributor
Posts: 3

SAS 9.3 import excel file

I used the same codes s in SAS 9.2 to imort excel file - however it did not work

the log file had ERROR message

 

ERROR: Connect: Class not registered

ERROR: Error in the LIBNAME statement.


I don't understant what I need to do so it will work

my operating system is Window XP version 2010

Super User
Posts: 10,028

Re: SAS 9.3 import excel file

Try different engine :

dbms=excel

dbms=xls

dbms=xlsx

New Contributor
Posts: 3

Re: SAS 9.3 import excel file

This is what I used in my code

but even if I try to import the file by locating its place on my folders it will not let me -" no connection"

I wonder why - this is no longer a cyntax problem

Super User
Posts: 10,028

Re: SAS 9.3 import excel file

As my opinion, you have no excel engine like XLS EXCEL registered in your SAS system .therefore you can't import excel file . Contact SAS support to confirm what is your problem .

Xia Keshan

SAS Super FREQ
Posts: 8,864

Re: SAS 9.3 import excel file

Hi:

  This is a known issue. If you had searched on Tech Support  (support.sas.com) for notes, using the text of the message (Class not registered) you would have found this note that says what the fix is for the Class not registered message: 52649 - Using the IMPORT and EXPORT procedures with Microsoft Excel and Microsoft Access fails and r...

  Usually, when you get this message, it is because you have a "bitness" mismatch between SAS and Office. For example, I have 64 bit SAS on my machine, but I have 32 bit Office. That means code that used to work in SAS 9.2 (when both applications were 32 bit applications) will no longer work with 64 bit SAS and 32 bit Excel. For an excellent discussion of why you need a "helper" file like the PC File Server as the middleman to do your export, please see this blog post by Chris Hemedinger How do I export from SAS to Excel files: Let me count the ways - The SAS Dummy

  Until you install the PC File Server, your import/export will not work as it used to.

cynthia

New Contributor NL
New Contributor
Posts: 4

Re: SAS 9.3 import excel file

Posted in reply to Cynthia_sas

Hi,

Would SAS 9.3 or 9.4 take care the "bitness" issue with the use of PC File Server?

Nelson

Super User
Posts: 3,252

Re: SAS 9.3 import excel file

Correct. But you can also cure this problem in SAS 9.3/9.4 by aligning the bitness of MS Office with SAS. For example we have 64-bit MS Office components stored on our SAS server to align with 64-bit SAS software and that avoids using the PC File Server.

If you are running SAS on the desktop only you can choose to install 32-bit SAS 9.3/9.4 to be compatible with 32-bit MS Office.

Might be also worth confirming that your SAS 9.3 has SAS/ACCESS for PC Files both installed and licensed. Use PROC SETINIT to confirm your licence.

New Contributor NL
New Contributor
Posts: 4

Re: SAS 9.3 import excel file

This may be a bit off the topic. I have SAS 9.2 (32 bit) installed in a 64 bit OS (laptop) and have MS Office 2010 (32 bit). However, I noticed the ACCESS Connectivity Engine is missing. I tried to download and install it but still unbale to see it in Registry editor. What is the root cause? Would SAS still be able to read Excel and export to Excel?

SAS Super FREQ
Posts: 8,864

Re: SAS 9.3 import excel file

Hi:

  I do not know whether you need the Microsoft ACE engine if you have SAS/Access to PC File Formats. This would be a question for Tech Support.

cynthia

Respected Advisor
Posts: 4,920

Re: SAS 9.3 import excel file

Read this page from the doc

SAS/ACCESS(R) 9.4 Interface to PC Files: Reference, Third Edition

for a partial answer to your question. Engine XLSX doesn't require ACE but has limited capabilities. It comes with the second maintenance release of SAS 9.4

(untested)

PG

PG
Ask a Question
Discussion stats
  • 9 replies
  • 2239 views
  • 1 like
  • 6 in conversation