I've decided to exclude all empty Excel workbooks from the proc import. Afterwards I've added a proc sql - create table step where I format the variables. After the proc import I add: /* excludes all empty Excel workbooks from above proc import */ %let dsid=%sysfunc(open(DER.&&Name&i)); %let numobs=%sysfunc(attrn(&dsid,nobs)); %let rc=%sysfunc(close(&dsid)); %if &numobs. eq 0 %then %do; %goto exit; %end; proc sql; create table DER&i as select and format my variables from DER.&&Name&i quit; /* Inserts all datasets from above into the first dataset from the Library */ %if &i gt 1 %then %do; proc sql; insert into DER1 select * from DER&i; quit; %end; %exit: %end;
... View more