3

SASを学んでいます。サンプルプログラムを実行しようとしました:

libname x "c:\Joe\SAS\class.xls";

data x.sheet2;
set x.'sheet1$'n;
bmi = 703 * weight / height**2;  
run;
libname x clear;

このエラーが発生します:

エラー:EXCELエンジンが見つかりません。エラー:LIBNAMEステートメントにエラーがあります。

私はインターネット上で次のようなことをするように言っているサイトを見つけました:

libname x excel "c:\Joe\SAS\class.xls";

しかし、同じエラーが発生します。この問題を解決する方法について何かアイデアはありますか?

4

2 に答える 2

4

You probably do not have SAS/ACCESS to PC FILES licensed. Run:

proc setinit; run;

When I run that I have one line amongst others:

---SAS/ACCESS Interface to PC Files
        31DEC2012

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:

proc import file="c:\Joe\SAS\class.xls" out=class dbms=xls replace; run;

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.

于 2013-01-09T16:21:50.107 に答える
0

That error message typically means that you do not have the SAS Access to PC Files product installed. Run this program to see what is licensed for your site:

proc setinint;
run;
于 2013-01-09T16:22:01.333 に答える