Friends,
In a project i am getting an 5 excel files every day and want to append these files in sas eg so can you please provide me sas macro code so i can import and append all this at one go.
See
http://www.sascommunity.org/wiki/Streamlining_Data-Driven_SAS_With_The_%25FOR_Macro
Scroll down to the last example named "Import all spreadsheets in all subfolders of a top folder"
Go back to source and ask them to supply data in a format other than Excel. Even getting it in CSV format will allow you to write robust datastep imports, with wildcards so you don't need to loop over files.
Not particularly heplfull I know, but it will save you some headaches. I will lay money on something will change in one of those Excel files at least once per import which will break your code.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.