I am trying to access data from excel workbook but I am not able to give a Libname ref, getting the following error.
My code:
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.
Thanks!
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/
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.
Have you tried using proc import with the dbms=xlsx option?
Art, CEO, AnalystFinder.com
You have an XLS file, not XLSX. Try some of the older engines such as XLS or Excel2003
Hi Art297,
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).
Thanks!
Dharmendra
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.
Hi SAsKiwi,
I have so many sheets, so I would need to run proc import so many times.
Thanks!
OK, this was just a thought if you couldn't get an Excel LIBNAME working at all.
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
;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.