DATA Step, Macro, Functions and more

SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

Reply
New Contributor
Posts: 4

SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

Hello, 

I've gone through several pages of google searches and the only topic that comes up about this is that it won't work if SAS and Excel are different bit versions. Both of mine are x64, and I had no issues until "upgrading" to Office 2013 (x64). I'd prefer to not go the PCFiles route. Has anyone found a reason why 9.4 and Office 2013 will not play nice?

 

My code:

%let path=...\CR\;

/* Setting Thesis library to store data sets */
libname CR "...\CR\SAS";
libname PageL excel "&path\Arizona\Keep_tabs_Page_level_Arizona_January.xls";
libname PostL excel "&path\Arizona\Keep_tabs_Post_level_Arizona_January.xls";

 

Log output:

121 %let path=C:\Users\Symtrips\Google Drive\Jobs\CR\;
122
123 /* Setting library to store data sets */
124 libname CR "...\CR\SAS";
NOTE: Libref CR was successfully assigned as follows:
Engine: V9
Physical Name: ...\CR\SAS
125 libname PageL excel "&path\Arizona\Keep_tabs_Page_level_Arizona_January.xls";
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.
126 libname PostL excel "&path\Arizona\Keep_tabs_Post_level_Arizona_January.xls";
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.

 

Thank you in advance! Again both programs are running the same bit version (x64)

Super User
Posts: 9,681

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

Did you try XLSX , XLS engine ?

 

libname PostL XLSX  "&path\Arizona\Keep_tabs_Post_level_Arizona_January.xls";

libname PostL XLS    "&path\Arizona\Keep_tabs_Post_level_Arizona_January.xls";

New Contributor
Posts: 4

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

I was able to work around by saving the file as an .xls and not specifying any engine.

 

"libname PageL "&path\... etc.xls" and it read in with no errors.

 

Still not sure what the issue is with Office 2013 and SAS 9.4.

 

As a note I was able to also use the "excel" engine after resaving the files as .xls and recieved no errors.

Super User
Posts: 3,108

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

What format were the files in originally if saving as XLS fixes the problem?

New Contributor
Posts: 4

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

The files had originally been saved as *.xlsx workbooks, but re-saving them as excel 97-2003 *.xls workbooks allowed SAS 9.4 to import them without error.

Super User
Posts: 3,108

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

We use SAS 9.4 and Office 2010 without problems, but I guess you did as well until upgrading to 2013. I'm assuming here you are using SAS running locally on a PC not on a server?

New Contributor
Posts: 4

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

Correct, no issues until upgrading from Office 2010 to 2013. SAS is running locally. Funnily enough my thesis spreadsheets are .xlsx but I haven't touched them since before the Office upgrade, those code files still function perfectly. Must be a header change in the 2013 file formatting causing SAS not to recognize it correctly. I also noticed that when using PCFiles, it will "import" the data from the newer .xlsx files but it doesn't actually read in correctly. Comes out with some garbage and corruption.

Senior User
Posts: 1

Re: SAS 9.4 x64 Connect: Class not registered importing excel 2013 x64 file

[ Edited ]

Hi,

 

Were you ever able to get your code to work using the excel or xlsx engine?

 

Thanks!

 

Ask a Question
Discussion stats
  • 7 replies
  • 1282 views
  • 0 likes
  • 4 in conversation