06-18-2012 01:20 PM
Users often need additional assistance with reading Excel worksheets in SDD.
In 4.x instances of SAS Drug Development (SDD), you can access Excel spreadsheets the same way you would on a PC. Here’s an example that creates a SAS data set named “XL_1” from the “Sheet1” worksheet in the “AE_Specs2.xlsx” workbook:
In 3.x instances, the rules are different. You can convert spreadsheets to SAS data sets using the Advanced Loader. To read a spreadsheet within a program, you’ll need to remote submit a PROC Import step or a LIBNAME statement, as in this example, which converts one worksheet (identified by the SHEETN Text parameter) in an Excel workbook (identified by the INXLS Input File parameter) to a SAS data set:
call execute('data _null_;');
call execute('call symput("inxls","' || pathname("&inxls") || '");');
call execute('call symput("sheetn","' || "&sheetn" || '");');
call execute('filename outxls "' || pathname("work") || '/temp.xls";');
proc upload infile="&inxls"
proc import out=r_data
proc download data=r_data
This is how we usually solve this challenge. Do you use this same approach or a different one?