Do note however, if you have SAS 9.4, and use the latest Excel format - XLSX, then you don't need to use macro or anything else. There is a simple libname statement as I noted above:
http://www2.sas.com/proceedings/sugi31/024-31.pdf
What this does:
libname mylib excel "path_to_file\filename.xlsx";
Is to create library reference to the filename.xlsx file. Within that libname each of the sheets will automatically have a dataset created for each tab in the spreadsheet. No need for imports etc.
Do note however, as I mentioned, any form of excel import has inherent issues.
... View more