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;
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!
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.
Ready to level-up your skills? Choose your own adventure.