BookmarkSubscribeRSS Feed
LittlesasMaster
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  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!

 

 

10 REPLIES 10
LittlesasMaster
Obsidian | Level 7
No i am on 9.3
Reeza
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. 

 

 

art297
Opal | Level 21

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

 

Art, CEO, AnalystFinder.com

 

Reeza
Super User

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

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

 

Thanks!

Dharmendra

SASKiwi
PROC Star

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.

LittlesasMaster
Obsidian | Level 7

Hi SAsKiwi,

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

Thanks!

 

SASKiwi
PROC Star

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

Tom
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:

http://blogs.sas.com/content/iml/2013/08/02/how-old-is-your-version-of-sas-release-dates-for-sas-sof...

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 24501 views
  • 2 likes
  • 5 in conversation