SAS Base (3)

The Excel workbook REGIONS.XLS contains the following four worksheets:
EAST
WEST
NORTH
SOUTH

The following program is submitted:

libname MYXLS ‘regions.xls’;

Which PROC PRINT step correctly displays the NORTH worksheet?
A. proc print data=MYXLS.NORTH;run;
B. proc print data=MYXLS.NORTH$;run;
C. proc print data=MYXLS.’NORTH’e;run;
D. proc print data=MYXLS.’NORTH$’n;run;

Check Answer
Answer: D

注解:使用SAS/ACCESS engine来读取Excel文件,Excel中的每一个worksheet会对应生成2个文件。以NORTH worksheet为例,SAS会生成2个文件:NORTH和NORTH$,worksheet中的数据存储在NORTH$中,但由于“$”并不是合法的data set名字,需要用到n notation。

Leave a Reply

Your email address will not be published. Required fields are marked *