Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using libname statement in 64 bit SAS to interact with 32 Excel

Tags:

excel-2007

sas

I have 64 bit SAS 9.4 installed and 32 bit Office 2007. When I had 32 bit SAS 9.3 installed, I was able to use a libname statement where the Excel file was the library and the "filename" that follows after the period was in fact a worksheet or named range in the Excel file. For example, you start with a libname statement

libname exceltst path="C:\Users\username\Documents\test.xlsx";

And, then later you can reference a named range in this with exceltst.stuff, assume "stuff" is a named range.

So, is this still possible? I am guessing it has to do with 64 bit sas and 32 bit excel but I am wondering if there is some variation that still works. I am able to use a proc export to export to the excel file and it works just fine but I have tried 20 variations on the libname and can't get it to work. The error I get is:

ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.
like image 697
GeoffDS Avatar asked Jan 11 '23 03:01

GeoffDS


1 Answers

If you can install SAS PC Files Server, you can still do this with the PCFILES destination. Installing the PC Files Server software is out of the scope of an answer here, but google about for instructions, they are readily available. You can install the PC Files Server on your desktop, or on a central server if that's more convenient for your workplace.

Once you have it installed, you just access it by:

libname mylib pcfiles path="blah\blah\blah.xlsx";

Just like you did before, but with a different dbms type.

like image 68
Joe Avatar answered May 19 '23 13:05

Joe