Hi, Can someone tell me if i want to import multiple sheets through macros by using loop how can I do that? Below is the mentioned program, I tried but working with the same name sheet i.e.(sheet1, sheet2, sheet3, and so on). What if the sheet name in excel is different (navin, pravin, sachin, abc...) %macro aml(a=); proc import datafile="D:\SAS\3. SAS classes clinical\DAY6 7\mydata1.xls" out=&a DBMS=xls replace; sheet="&a"; getnames=yes; run; %mend aml; %macro lop; data _null_; %do i=1 %to 2; %aml(a=sheet&i); %end; run; %mend lop; thanks in advance Regards, Navin Dhawan
... View more