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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 7 replies
  • 5694 views
  • 1 like
  • 3 in conversation