04-12-2012 02:17 PM
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)?
04-13-2012 09:05 AM
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;
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.