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:
libname readit xlsx "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xlsx";
proc print data = readit.soccer;
run;
Hi @tianerhu
You should use the xlsx engine.
This statement assigns the libref, myxlsx, to a Microsoft Excel .xlsx file and uses the XLSX engine:
LIBNAME myxlsx XLSX 'c:\demo.xlsx';
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;
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)
do not choose the following:
the second place :
change " soccer.xls " to "soccer.xlsx " in the program
Ok, the program work well.
Thank you again.
@tianerhu - Please update your post as answered.
libname readit xlsx "C:\Users\Documents\My SAS Files\9.4\chapter 6\soccer.xlsx";
proc print data = readit.soccer;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.