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
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";
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.