So I'm currently trying to export a SAS dataset as an xlsx file within the task scheduler on Windows 10. The code works when manually ran in SAS, it works when I run the batch file outside of the scheduler, but once I try to have the scheduled task run at its time, the program is unable to export the file and instead keeps assigning a file type of $$1. I really don't know what else to try. The code of interest is below as well as the log from the scheduled task and the batch manuallyr ran. Code: %let webipath = H:\; data _null_; %let filename1 = %sysfunc(putn("&sysdate9"d,mmddyyd8.))_Monitoring_Report.xlsx; run; %put &filename1; PROC export data= Sample outfile= "&webipath\&filename1" DBMS=xlsx REPLACE; Sheet="Monitoring"; RUN; Log error from task scheduler: ERROR: Temporary file for XLSX file can not be created -> H:\05-25-23_Monitoring_Report.$$1. Make sure the path name is correct and that you have write permission. Log from batch, when ran outside of the task scheduler: NOTE: The export data set has 17 observations and 265 variables. NOTE: "H:\05-25-23_Monitoring_Report.xlsx" file was successfully created. NOTE: PROCEDURE EXPORT used (Total process time): real time 0.50 seconds cpu time 0.12 seconds
... View more