Desktop productivity for business analysts and programmers

Automate import files

Occasional Learner
Posts: 1

Automate import files

Good day


I would like to automate Excel files that is stored on a server. This should import the files outomaticly every week. Is this posible and how will I go about to make this work?


The files is updated for each month. Ex






Super User
Posts: 10,582

Re: Automate import files

Start with creating SAS code that successfully imports one file.

For consistent results, I would strongly advise to not use the Excel file format, but a textual format like csv and a properly written data step, so that unexpected changes in the input data structure are caught at the earliest possible point of your ETL chain. .xls is crap as a data transfer format.


Then parameterize the infile name:

data _null_;
filedate = put(today(),yymmd7.);
call symputx('filedate',filedate);

filename in "/path/file_&filedate..csv";


Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation