BookmarkSubscribeRSS Feed
Obsidian | Level 7

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

but I am not able to download this, is there any alternate way to do this.





Obsidian | Level 7
No i am on 9.3
Super User

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. 



Opal | Level 21

Have you tried using proc import with the dbms=xlsx option?


Art, CEO,


Super User

You have an XLS file, not XLSX. Try some of the older engines such as XLS or Excel2003

Obsidian | Level 7

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).





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.

Obsidian | Level 7

Hi SAsKiwi,

I have so many sheets, so I would need to run proc import so many times.




OK, this was just a thought if you couldn't get an Excel LIBNAME working at all.

Super User Tom
Super User

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.;
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



Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 5 in conversation