BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tianerhu
Pyrite | Level 9

I want to use engine to read an excel spreadsheet , but failed .

please give a help , thank you.

libname readit "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xls";
proc print data = readit.soccer;
run;

The following is the log said:

126 libname readit "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xls";
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement.
127 proc print data = readit.soccer;
ERROR: Libref READIT is not assigned.
128 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):

 

The following is one example from my book:

tianerhu_0-1609214710337.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
tianerhu
Pyrite | Level 9
libname readit xlsx  "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xlsx";
proc print data = readit.soccer;
run;

View solution in original post

7 REPLIES 7
Anand_V
Ammonite | Level 13

Hi @tianerhu 

 

You should use the xlsx engine.

 

https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.5&docsetId=acpcref&docsetTarget=n...

 

This statement assigns the libref, myxlsx, to a Microsoft Excel .xlsx file and uses the XLSX engine:

LIBNAME myxlsx XLSX 'c:\demo.xlsx';
tianerhu
Pyrite | Level 9
Thank you , but it not what I want, I add one example from my book.
SASKiwi
PROC Star

So what is wrong with this?

libname readit xlsx "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xls";
proc print data = readit.soccer;
run;
tianerhu
Pyrite | Level 9

Now, I have sloved this problem. Thank you so much.

libname readit xlsx  "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xlsx";
proc print data = readit.soccer;
run;

need to change two place:

the first place:(choose the blue part)

tianerhu_0-1609270268905.png

do not choose the following:

tianerhu_1-1609270364727.png

 

the second place :

change " soccer.xls " to "soccer.xlsx "   in the program

 

Ok,  the program work well.

 

Thank you again.

SASKiwi
PROC Star

@tianerhu - Please update your post as answered.

tianerhu
Pyrite | Level 9
libname readit xlsx  "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xlsx";
proc print data = readit.soccer;
run;
tianerhu
Pyrite | Level 9
You are right. Thank you .

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 7 replies
  • 5310 views
  • 1 like
  • 3 in conversation