01-14-2015 02:22 PM
I have a data step that exports to excel . I need to delet /remove the original file. How do I go about deleting the file before the export process starts
I currently have this script for deleting it's not working
filename myfile "c:\daily\GT.xlsx";
01-14-2015 03:21 PM
If you are using proc export then add the REPLACE option to overwrite the existing file. No need for a separate step to delete.
proc export data=yourdate outfile="your file name" dbms=excelcs (or which ever you are using) REPLACE; run;
01-14-2015 05:20 PM
Ive tried that option an it doesn't replace the original file it happen when I convert to xlsx format.
so deleteing it is best option since it runs every three hours..
i Have this code that deletes what I need but the cmd prompt window stays open any ideas how to close it?
%let fname =GT.xlsx;
x del "&edit.\&fname.";