I am running a program that pulls together several data sets. At the end of the macro, the data is all exported to named ranges in an Excel file, and the ranges populate several tables on different worksheets. For the past few days, every time I run this program, the Excel file will not open. Instead I get the error in the attached screenshot. I get one warning in the SAS log, "No matching members in directory," on a PROC DATASETS statement. It seems like something's going wrong with the creating of the file, not the export. Even stranger, if I run only the code that creates the Excel file and exports the data, the resulting Excel file populates correctly and can be opened. So what is causing the Excel file to get corrupted? What follows is an abbreviated version of the code that creates the file and exports the data. data _null_; x "cp ""/sasprod/ca/sasdata/innovation/cost and use/CandU_Executive_Summary_Shell.xlsx"" ""/sasprod/ca/sasdata/innovation/cost and use/Cost_and_Use_Dashboard_&client._&rundate..xlsx"" "; run; libname rptbase2 pcfiles server=DT1 version=2007 path="\\grid\sasprod\ca\sasdata\innovation\cost and use\Cost_and_Use_Dashboard_&client._&rundate..xlsx"; proc datasets lib=rptbase2; delete bands; delete age_band; delete readmissions; quit; proc sql; create table rptbase2.bands as select * from bands; quit; proc sql; create table rptbase2.readmissions as select * from readmissions; quit; proc sql; create table rptbase2.age_band as select * from age_band; quit;
... View more