Hi everyone! First-time poster, so I'm hoping this works. I have an assessment form that I would like to auto-populate using SAS. I have created this form (read: made column titles and rows) in excel, and have written the SAS code to get the numbers that I want to add to said form. Now I would like SAS to send said data to the corresponding cells in my excel sheet. Basically, I'd to be able to update this form weekly without having to manually copy and paste my SAS proc freq results into excel. The closest I have come to a solution through googling is to use SAS DDE, with the steps I found here: https://stats.idre.ucla.edu/sas/faq/how-can-i-send-sas-dataresults-to-specific-cells-in-an-excel-spreadsheet/ in example #2. Basically I want to be able to tell SAS to put these 12 numbers from proc freq: Into these 12 cells in my excel sheet: This is what I have tried so far: proc freq data=merged3 noprint; tables CT_name/nopercent nocum out=tc_count3; run; options noxwait noxsync; %sysexec '"C:\CBO Reports\ASM.xlsx"'; data _null_; rc=sleep(5);* wait for 5 seconds; run; filename ada dde 'excel|[ASM.xlsx]Sheet1!r8c2:r19c2'; data tc_count3; set tc_count3; file ada; if _stat_ = "COUNT" then put score; run; I've also tried it with this block, using x instead of %sysexec: options noxwait noxsync; x '"C:\CBO Reports\ASM.xlsx"'; filename example2 dde 'excel|[ASM.xlsx]Sheet1!r8c2:r19c2'; data tc_count3; set tc_count3; file example2; if _stat_ = "MEAN" then put score; run; When I do the first, it successfully opens my excel sheet (so that part works) but it's just not adding the numbers anywhere. There doesn't seem to be an error message either. It just says there were 0 observations read into the excel sheet. Any ideas would be really great. Thank you!
... View more