Desktop productivity for business analysts and programmers

Automation of multipe excel files and appending those in sas eg

Reply
Occasional Contributor
Posts: 8

Automation of multipe excel files and appending those in sas eg

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.

Trusted Advisor
Posts: 1,770

Re: Automation of multipe excel files and appending those in sas eg

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"

Super User
Super User
Posts: 7,671

Re: Automation of multipe excel files and appending those in sas eg

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.

Ask a Question
Discussion stats
  • 2 replies
  • 319 views
  • 0 likes
  • 3 in conversation