03-25-2015 06:53 PM
I use the import wizard but when I select the file and click OK I get the error message in my log :
ERROR:Connect: Class not registered
ERROR: Error in the LIBNAME statement.
I am a new user and still getting used to it.
Any idea how to open my files?
03-26-2015 09:28 AM
It's impossible to answer this question without seeing your program code.
Please cut-and-paste the relevent part of the code.
Oh, sorry - you said you were using the import wizard... (I always write my program code, so I would be using a Proc Import statement)
I can't help with that.
03-26-2015 10:36 AM
More than likely you're using SAS 64bit and have Excel 32 bit.
Try using the PCFILES or the EXCELCS in the drop down if they're available.
via the libname method it would look like the following:
libname XLS pcfiles path='path_to_excel_file.xlsx';
libname XLS excelcs 'path_to_excel_file.xlsx';
03-26-2015 05:15 PM
The code I use is:
libname census pcfiles path="C:\Users\mzavalza\Documents\Myriam\Census 2010_ACS data_excel\Cens_ZIP_URBAN AND RURAL.xlsx";
And I get this error:
ERROR: Unable to locate pcfserver.exe. Please install PC Files Server.
ERROR: Error in the LIBNAME statement.
But when I check my SAS license like this:
I get in the log that I have the pc files
---SAS/ACCESS Interface to DB2
---SAS/ACCESS Interface to Oracle
---SAS/ACCESS Interface to Sybase
---SAS/ACCESS Interface to PC Files
---SAS/ACCESS Interface to ODBC
---SAS/ACCESS Interface to OLE DB
---SAS/ACCESS Interface to Teradata
---SAS/ACCESS Interface to MySQL
I have to use the pc files isnce my SAS version is 64 bit and my excel is 32 bit
03-26-2015 05:44 PM
I remember a co-worker had this problem, and he needed to install "SAS PC Files Server"
This link has the instructions for checking to see if you already have it installed. (I'm not sure the SAS/Access you checked is the same thing.)
03-26-2015 05:49 PM
When I try the import option and choose the Microsoft Excel Workbook on PC files server this window appears:
I will sound very dumb but what would the server name be?
cwilson I will check that right now
03-26-2015 07:11 PM
A machine on your network running the PC Files Server programs.
PC Files as shown in your setinit output is not the same as PC Files Server. Possibly a poor choice of naming on the part of SAS.
Have you tried Libname census excel <etc>?
03-26-2015 07:13 PM
Yes I've tried that too but doesn't work either with excel or excelcs -.-
When I followed the link for the PC Files Server it says is only fro SAS 9.3 I wonder if it also works for 9.4 which is what I have...
04-03-2015 02:35 PM
Hi there.. just wanted you to know I moved this from the "About Communities" space to the "Integrations with Microsoft Office" space here: https://communities.sas.com/community/support-communities/integration_with_microsoft_office
04-03-2015 02:41 PM
I suspect you won't be re-reading this type of data on a daily basis. It may well be worth the not very significant effort to save the Excel file as CSV and import that version. One advantage is that SAS will create data step code that you can modify if something is imported in an unexpected manner.
04-03-2015 02:32 PM
The PC files server is a program to be started on a Windows machine.
That Windows machine is having a DNS name (internet name) and using a port number. Nothing weird as your browser is going to a server using a portnumber (80 or 436).
At what machine are you running the PC files server? It van be your local machine, that it is having also a name. look at the hosts file C:\Windows\System32\drivers\etc and services you will see localhost as a valid name, otherwise use ipconfig /all showing all of tcp/ip.
That class not being registered is a common issue having 64-bit SAS or Eguide and using a 32-bit Office, The same bitness clients should be installed. Having a 64-bit SAS-base and 32-bit Offic you can use the 32-bit version of pcfile-server to get arround that. Why using that servername? You can access PC-files sercver also using/running Unix and circumvent the different OS systems with that.. You have to define that port number at the client/libname.
04-07-2015 02:55 PM
I ended up using this code to make my excel files into SAS files.
PROC IMPORT OUT= WORK.data2 DATAFILE= "C:\data1.xlsx"
Thank you for all of your help.