how can i limit the number of rows i read from excel? whenver i try to use something like nobs or obs dataset options i get errors. thank you. My current code is: %macro readxls; %do w = 1 %to &filecount; %do s = 1 %to 2; proc import datafile="/workspace/&&filename_&w" out=sheetname_&w&s dbms=xlsx replace; sheet = "&&sheetname_&s"; getnames= YES; run; %end;*close sheet loop; %end;*close workbook loop;