DATA Step, Macro, Functions and more

ERROR when using SAS Enterprise Guide (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

ERROR when using SAS Enterprise Guide (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

[ Edited ]

When I try to load a file "test.xls" (97-2003 Workbook) that is generated by Microsoft Excel 2010 SMO 64 bit, using Enterprise Guide 64 bit. The test.xls is a The error message is:

 

ERROR: Connect: Class not registered

ERROR: Error in the LIBNAME statement

 

I have tried the following statement and all have the same error

 

libname refname excel path="C:\workspace\test.xls'';

libname refname "C:\workspace\test.xls";

 

I also tried to cover 'test.xls' (Excel 97-2003 Workbook) to 'text.xlsx'(Excel Workbook), and the following statement also did not work:

 

libname refname excel path='C:\workspace\test.xlsx';

libname refname xlsx path='C:\workspace\test.xlsx';

libname refname 'C:\workspace\test.xlsx';

 

Appreciate any advice!

 

 

 


Accepted Solutions
Solution
3 weeks ago
Super User
Super User
Posts: 9,599

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

You have typos in that code:

 

libname tmp excel 'C:\workspace\test.xlsx';

Take the path= out of it.  

 

 

Or you can use proc import:

 

proc import datafile="c:/workspace/test.xlsx" out=want dbms=xlsx replace;
run;

Note that to load XLS files you will need pcfiles server as that is a very old file format and windows only.

 

View solution in original post


All Replies
Solution
3 weeks ago
Super User
Super User
Posts: 9,599

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

You have typos in that code:

 

libname tmp excel 'C:\workspace\test.xlsx';

Take the path= out of it.  

 

 

Or you can use proc import:

 

proc import datafile="c:/workspace/test.xlsx" out=want dbms=xlsx replace;
run;

Note that to load XLS files you will need pcfiles server as that is a very old file format and windows only.

 

New Contributor
Posts: 4

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

[ Edited ]

The first option below does not work and still has the same error:

libname tmp excel 'C:\workspace\test.xlsx';

The second option works beautifully:

 

 

 

proc import datafile="c:/workspace/test.xlsx" out=want dbms=xlsx replace; run;<code></code>

 

 

 

 

My understanding is that I do not need pcfile server, since I have using both 64 bit Excel and 64 bit SAS. The following is from the link of SAS Support

 

"If you are running a 64-bit version of Microsoft Office and SAS on 64-bit Microsoft Windows, you do not need to install SAS PC Files Server, except if you plan to connect from a Linux- or UNIX-based SAS installation."

Super User
Posts: 10,211

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

[ Edited ]

Use the same engine that works in proc import for your libname:

libname tmp xlsx 'C:\workspace\test.xlsx';

 

PS this was meant to be an answer to a post from @xiliang that has been deleted in the meantime.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Super User
Posts: 9,599

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

Posted in reply to KurtBremser

Quite true, there are far to many Excel based engines around.  Just use a nice open source file format and bin the horrible proprietary stuff for a better future for us all!

Super User
Posts: 10,211

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit


@RW9 wrote:

Quite true, there are far to many Excel based engines around.  Just use a nice open source file format and bin the horrible proprietary stuff for a better future for us all!


Absolutely. That stuff has proven itself to be a total hellhole for users. I know why I exclusively use LibreOffice for my spreadsheet needs. Has kept the same file format and user interface for more than a decade now. That's why I've been urging SAS every now and then to support OpenOffice/LibreOffice, at least the .ods format.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 4

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

Thanks! Indeed the error was caused by a typo!

Super User
Posts: 10,211

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

Are you using the Local SAS server? If not, you won't have access to the C: drive of your desktop.

Do you have SAS/ACCESS to PC Files licensed? Run proc setinit and proc product_status to determine that.

 

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 4

Re: ERROR when using SAS Enterprice Guid (64bit, 9.04 Base) to load Microsoft Excel 2010 MSO 64 bit

Posted in reply to KurtBremser

I am using my Desktop version of SAS. Does this mean I am using Local SAS server?

 

I think I have PC Files licensed. Here is the list:

 

For Base SAS Software ...
Custom version information: 9.4_M5
Image version information: 9.04.01M5P090617
For SAS/STAT ...
Custom version information: 14.3
For SAS/GRAPH ...
Custom version information: 9.4_M5
For SAS/IML ...
Custom version information: 14.3
For SAS/QC ...
Custom version information: 14.3
For High Performance Suite ...
Custom version information: 2.2_M6
For SAS/ACCESS Interface to PC Files ...
Custom version information: 9.4_M5
For SAS/ACCESS Interface to ODBC ...

 

 

Are you using the Local SAS server? If not, you won't have access to the C: drive of your desktop.

Do you have SAS/ACCESS to PC Files licensed? Run proc setinit and proc product_status to determine that.

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 94 views
  • 2 likes
  • 3 in conversation