DATA Step, Macro, Functions and more

ODS HTML process - showing a popup window

Reply
Frequent Contributor
Posts: 129

ODS HTML process - showing a popup window

Hi,

 

I want to some data in the file using ODS HTML process. for somereason, when I run this code below (SAMPLE) the file is saved in the desired destination but it opens up a pop up menu "File download" with an option to Open/Save/Cancel. usually I just press Cancel and the rest of the process runs fine.

 

please advise how to get rid of this popup as my files are already saved without this addiotnal step

 

 

 


ods listing close;
ods html file = "C:\temp\File_&date..xls" style=fancyprinter;

proc tabulate data = temp2 out = incSCR;
class Locations products;
var avg_TAT le_per /style=[cellwidth=2.0 cm background=white];
format products o_code. Locations facility_out.;
table Locations='', products*(avg_TAT="Avg"*f=3. le_per="days"*f=percent10. )/MISSTEXT = "" box = [label = "Locations" style = [cellwidth = 2 cm]];
title1 'Title';
title2 'title';
title3 %bquote(Exams completed: &Date);
keylabel sum = " ";
run;
ods html close;
ods listing;

 

Thanks

Frequent Contributor
Posts: 129

ODS HTML process - how to disable pop up window

Hi,

 

I am using ods html process to store some values in an excel file... here is a sample that is saving file as per the requirement but for some unknown reason, poping up a window (file download) asking me to select one of the following options: open/save/cancel file. usualy I select cancel and the process proceed to the following steps. is there a way to get rid of this addional step

 

 

 


ods listing close;
ods html file = "C:\temp\File_&date..xls" style=fancyprinter;

proc tabulate data = temp2 out = incSCR;
class Locations products;
var avg_TAT le_per /style=[cellwidth=2.0 cm background=white];
format products o_code. Locations facility_out.;
table Locations='', products*(avg_TAT="Avg"*f=3. le_per="days"*f=percent10. )/MISSTEXT = "" box = [label = "Locations" style = [cellwidth = 2 cm]];
title1 'Title';
title2 'title';
title3 %bquote(Exams completed: &Date);
keylabel sum = " ";
run;
ods html close;
ods listing;

 

 

 

Thanks

SAS Super FREQ
Posts: 8,744

Re: ODS HTML process - how to disable pop up window

[ Edited ]

Hi:
When I test a version of your code using SASHELP.CLASS in SAS 9.4 I do NOT get a popup window that asks if I want to do a download.

However, if I run the same code using SAS Enterprise Guide, then while there is NOT a popup window, there IS a download button on the results tab for the ODS HTML output -- but this is normal EG behavior.

When I run the program in SAS Studio, I do not get a popup window. So I am not sure why you are getting a popup window.

I do not normally recommend using the .XLS file extension with ODS HTML because Microsoft Excel can complain about the fact that the file "internals" are HTML, but you've named the file as a .XLS file, which is technically incorrect.

As an aside, I'm not sure why you need an OUT= option -- the format for the tabulate data that's created will not follow the format of the table as shown in the browser or in Excel. So it seems unnecessary. Also you use a macro variable &DATE, but don't show how you set it or why you need %bquote -- and although it would not explain the popup window issue, it's something I wonder about.

cynthia

Here's the code I tried:

ods _all_ close;
ods html file = "C:\temp\File_dispmgr.xls" style=fancyprinter;

proc tabulate data = sashelp.class ;
class age  sex;
var height weight /style=[cellwidth=2.0 cm background=white];
 table age='', sex*mean*(height="ht"  weight="wt"  )/
    MISSTEXT = "" box = [label = "Locations" style = [cellwidth = 2 cm]];
title1 'Title1';
title2 'title2';
 keylabel sum = " ";
run;
ods html close;
ods listing;
Ask a Question
Discussion stats
  • 2 replies
  • 101 views
  • 0 likes
  • 2 in conversation