I currently use this process to append multiple datasets to one excel document at any given location: the two data sets are exported and become two seperate tabs in the "&folder.CPSC_Enrollment__&dt..xls" %let pc = NYWSWXXXXXX; %let folder = C:\Users\drountree\; data _null_; dt=put( today( ),date9. ); call symput('dt',dt); run; proc export data = Summary_By_Org_HMO outfile = "&folder.CPSC_Enrollment__&dt..xls" dbms = excelcs replace; sheet = "Summary_By_Org_HMO"; SERVER = "&pc"; run; proc export data = Summary_By_Org_PPO outfile = "&folder.CPSC_Enrollment__&dt..xls" dbms = excelcs replace; sheet = "Summary_By_Org_PPO"; SERVER = "&pc"; run; Now this is where it gets fun. I understand fully the section above and I'm able to code multiple datasets meeting various requirements and have them output to various .XLS on different tabs based on a given criteria. MY PROBLEM: I need to take a newly learned process via data_null; (ODS tagsets subset PROC REPORT) and take the output Transposed file and export each one to the same xls as above based on a given condition. PROC TRANSPOSE DATA=Empire_X3370 OUT=Empire_X3370 PREFIX=ID_; SYSECHO "PROC TRANSPOSE DATA=ABRIDGED OUT=ABRIDGED PREFIX=ID_;"; BY CategoryCode CategoryDescription indx; var Benefit; id PBP_Number; idlabel idlabel; RUN; ods tagsets.ExcelXP file= '/windows/Infodata/DRountree/CAB/Empire_X3370.xml'; PROC REPORT DATA=Empire_X3370 spanrows nowd split='~'; columns CategoryCode CategoryDescription ID_:; Define CategoryCode / order order=internal noprint; define CategoryDescription / order 'Plan Name~Current Enrollment~Star Rating~Contract Number/PBP'; define ID_: / display; compute after CategoryCode; line ' '; endcomp; run; ods tagsets.excelxp close; The above code creates one data set Empire_X3370 and exports a XML file to the specified location. I'm creating several different comparissions and need to export Blue_X5590 to the same file but in a different tab. Keep in mind if this wasn't a PROC REPORT ODS XML output then this would be easy and I could use the first set of code above: %let pc = NYWSWXXXXXX; %let folder = C:\Users\drountree\; data _null_; dt=put( today( ),date9. ); call symput('dt',dt); run; proc export data = Empire_X3370 outfile = "&folder.CPSC_Enrollment__&dt..xls" dbms = excelcs replace; sheet = "Empire_X3370"; SERVER = "&pc"; run; proc export data = Blue_X5590 outfile = "&folder.CPSC_Enrollment__&dt..xls" dbms = excelcs replace; sheet = "Blue_X5590"; SERVER = "&pc"; run; The problem is the output from the PROC REPORT...
... View more