02-18-2017 10:05 AM
I am trying to access data from excel workbook but I am not able to give a Libname ref, getting the following error.
LIBNAME mylib excel "C:\Users\ak26\Desktop\Readme.xls";
Error I am getting-
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.
Please help me out.
I tried to download PC Files server form http://support.sas.com/downloads/browse.htm?cat=63
but I am not able to download this, is there any alternate way to do this.
02-18-2017 10:21 AM - edited 02-18-2017 10:59 AM
If you're on 9.4 you can use the xlsx engine. Take a look at: http://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/
02-19-2017 02:42 AM
I thought an earlier version of the XLSX engine was available in SAS 9.3 TS1M3. Definitely for exporting, not sure about importing.
If you have this problem solved please mark it as such, otherwise clarify which engines you've tried and haven't worked.
02-18-2017 09:35 PM
Proc import is working for both xls and xlsx files,
Actually I have got 12 sheets in my workbook, so I was planning if I can define a libname with excel engine
then I can directly use those sheets (those will apear with $ and sheet name).
02-18-2017 05:39 PM - edited 02-18-2017 05:40 PM
A quick and dirty solution would be to do a FILE SAVE AS in Excel as CSV, then import the resulting CSV file using PROC IMPORT DBMS = CSV.
02-19-2017 09:20 AM
Trouble with the EXCEL engine is usually a sign that your SAS and Microsoft Office installations are using different number of bits (32 vs 64). Can you get a different installation of either so that they are compatible?
Or just upgrade to SAS 9.4 and use the XLS engine on your LIBNAME statement.
Note that SAS 9.3 is now over 4 and half years old.
From Rick's blog posting:
data Releases; format Date DATE7.; input Category $13. Release $9. Date DATE9. StatRelease $5.; datalines; Ancient 8.0 01Nov1999 Ancient 8.1 01Jul2000 Ancient 8.2 01Mar2001 Ancient 9.0 01Oct2002 Ancient 9.1 01Dec2003 Ancient 9.1.3 01Aug2004 Ancient 9.2 01Mar2008 9.2 Old 9.2m2 01Apr2010 9.22 Old 9.3 12Jul2011 9.3 Old 9.3m2 29Aug2012 12.1 Recent 9.4 10Jul2013 12.3 Recent 9.4m1 15Dec2013 13.1 Recent 9.4m2 05Aug2014 13.2 Recent 9.4m3 14Jul2015 14.1 Recent 9.4m4 16Nov2016 14.2 ;