BookmarkSubscribeRSS Feed
Fkoch01
Calcite | Level 5

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

file_2017-03

file_2017-02

...

 

Regards

1 REPLY 1
Kurt_Bremser
Super User

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);
run;

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

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2240 views
  • 2 likes
  • 2 in conversation