I need to read in a ~40 spreadsheet excel file. I found this macro posted on another forum, which has been incredible helpful- %macro imp (insheet=); proc import out=work.&insheet datafile= "filename.xls" dbms=excel replace; sheet="&insheet.$"; getnames=YES; mixed=NO; scantext=YES; usedate=YES; scantime=YES; %mend imp; However, I need to add in "guessingrows=500;" but the macro fails every time I include it. Now the macro looks like this- %macro impb (insheet=); proc import out=work.&insheet datafile= "filename.xls" dbms=excel replace; sheet="&insheet.$"; getnames=YES; mixed=NO; guessingrows=500; usedate=YES; scantime=YES; %mend impb; And error messages look like this- NOTE: The previous statement has been deleted. NOTE: The previous statement has been deleted. ERROR 180-322: Statement is not valid or it is used out of proper order. I've searched around and can't figure out why the macro no longer works. Obviously it looks like is has something to do with the order, but I have moved the guessingrows statement to no success. Thoughts? Thanks in advance for your help!
... View more