Which program assigns the library reference exlib to the CLASS. XLSX workbook and displays the CLASS_TEST worksheet?
The correct answer is option D, which uses the LIBNAME statement correctly to assign a library reference to an Excel workbook and specifies the correct syntax for accessing a worksheet within that workbook. The syntax for this option is:
libname exlib xlsx 'c:class.xlsx';
proc print data=exlib.class_test;
run;
This code snippet assigns the library reference exlib to the Excel workbook located at c:class.xlsx using the XLSX engine. The PROC PRINT step is then used to display the contents of the worksheet named CLASS_TEST within that workbook. The library reference exlib combined with the dataset name class_test (following the .) correctly specifies the worksheet to be printed. The other options (A, B, C) are incorrect due to various reasons: incorrect syntax for the LIBNAME statement, incorrect specification of the dataset to be printed, and incorrect path specifications. Reference: SAS 9.4 Guide to Software Updates.
Currently there are no comments in this discussion, be the first to comment!