The SAS Output Delivery System and reporting techniques

ODS html default

Occasional Contributor
Posts: 7

ODS html default

I enjoy the html destination default in 9.3 in windows.

But I noticed when I right click in the explorer on a dataset and click "view in excel," the program exports the file to excel, then closes html and reopens listing.

Shouldn't it default back to html (in the work directory)?


Posts: 9,368

Re: ODS html default


  The 'view in Excel' choice issues a new ODS HTML step to create the file for viewing in Excel, which has the side effect of closing your automatic file. So you can get back to what you want by issuing just a bit of code after the view in Excel:

ods listing close;

ods html;

ods preferences;

And that should restart the collection of automatic HTML results again.

Alternately, all the 'view in Excel' choice is doing is causing an ODS HTML step to run. You could take control of this choice by writing your own code in such a way that you do not "bump" into the automatic ODS HTML file:

ods html(id=999) file='c:\temp\seedata.xls';

proc print data=sashelp.class;


ods html(id=999) close;

then you do not bump into the automatic file, it will still collect, but you have created an explicitly named file with a special ID= value (which will appear in the Results Window for you to click on) and when you close it, you won't close the automatic HTML creation.


Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation