Learning SAS? Welcome to the exclusive online community for all SAS learners.

How to print to an Excel file in Studio/University Edition

Accepted Solution Solved
Reply
Contributor
Posts: 64
Accepted Solution

How to print to an Excel file in Studio/University Edition

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;

Will

 


Accepted Solutions
Solution
‎04-18-2017 01:41 AM
Contributor
Posts: 64

Re: How to print to an Excel file in Studio/University Edition

Ha! It looks like I can't accept it. 

View solution in original post


All Replies
Solution
‎04-18-2017 01:41 AM
Contributor
Posts: 64

Re: How to print to an Excel file in Studio/University Edition

Ha! It looks like I can't accept it. 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 223 views
  • 0 likes
  • 1 in conversation