I am learning SAS. I tried to run a sample program:
libname x "c:\Joe\SAS\class.xls";
data x.sheet2;
set x.'sheet1$'n;
bmi = 703 * weight / height**2;
run;
libname x clear;
I am getting this error:
ERROR: The EXCEL engine cannot be found.
ERROR: Error in the LIBNAME statement.
I found a site on the internet that said to do something like:
libname x excel "c:\Joe\SAS\class.xls";
But I get the same error. Any ideas on how to solve this problem?
You probably do not have SAS/ACCESS to PC FILES licensed. Run:
When I run that I have one line amongst others:
If you don’t have that line, you can’t run PROC IMPORT with an EXCEL option.
There are workarounds. For an ‘xls’ file, ‘xls’ is a legal engine, that does not require that:
I don’t know if LIBNAME works as well here or not – but PROC IMPORT is fairly identical in how it works [only you have to pick which sheet up front, and do one IMPORT for each sheet]. PROC EXPORT is the output equivalent of PROC IMPORT.