BookmarkSubscribeRSS Feed
Ajay
Fluorite | Level 6

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)?

Thanks

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  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;

run;

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.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 810 views
  • 0 likes
  • 2 in conversation