04-18-2017 01:40 AM
This solution arose from a question I posted about getting a corrupt file when trying to print to Excel. For the benefit of others, I am reposting with a better subject line. I will accept my own posting as a solution.
In summary, here is what turns off output to the Results window, allows printing to an Excel file, then turns on output to the Results window again. The key line of code (thanks to Tom, a Super User on this "board") is ods html5(web) exclude all; followed after the proc print by ods html5(web) exclude none:
ods html5(web) exclude all; ods excel file="/folders/myshortcuts/etc./MyNiceExcelFile.xlsx"; proc print data=whatever noobs; var <variable names>; format <formatting statements>; run; ods excel close; ods html5(web) exclude none;
Need further help from the community? Please ask a new question.