@Reeza wrote:
Why would that even matter though if all the output was needed? Maybe I'm not understanding the requirements then.
If you turned off other destinations/results which are open by default and have only ODS EXCEL open all the results should go there by default.
How does the subprogram that is just trying to use ODS EXCEL the dump some data know what other destinations it needs to close and how to open them again?
Can you show example that turns off all other destinations AND turns that back on again? Works with the goofy things that SAS/Studio sets up? etc.
This works fine in SAS Studio. Studio resets the settings so you can just turn it off, it turns them on automatically after.
ods _all_ close;
ods excel file='/home/fkhurshed/Demo1/x21.xlsx';
proc report data=sashelp.class; run;
ods excel close;
No results in the Results window, running proc print after goes to results window without the need to reset anything.
Just tested on SAS Academics on Demand, which is 9.4 M6
@Reeza wrote:
This works fine in SAS Studio. Studio resets the settings so you can just turn it off, it turns them on automatically after.
ods _all_ close; ods excel file='/home/fkhurshed/Demo1/x21.xlsx'; proc report data=sashelp.class; run; ods excel close;
No results in the Results window, running proc print after goes to results window without the need to reset anything.
Just tested on SAS Academics on Demand, which is 9.4 M6
SAS/Studio does not have any function I can call to turn them on again. It might in the next block of code that is submitted but nothing I have seen that I can trigger after I am done dumping my data to excel and want to continue with the rest of my program.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.