Hello,
I am trying to export a proc tabulate results to excel file and every time I run, it prompts a window asking permission to open,save or close the file, something like "Do you want to open oe save this file? Is there a way to disable the prompt?
Below is my code
ods html file= "E:\report.xls";
Proc tabulate data=sims_data;
... ;
...;
run;
ods html close;
Thanks in advance for your help.
You are using the HTML destination to create HTML output. The XLS extension tells windows to open the file using excel. Although excel knows how to open an html file, it prompts you to be sure.
Consider using the excelxp tagset to save the file as an XML file.
ods tagsets.excelxp file= "c:\report.xml";
Proc tabulate data=sashelp.class;
class sex age;
var height;
table age,sex*height*mean;
run;
ods tagsets.excelxp close;
You are using the HTML destination to create HTML output. The XLS extension tells windows to open the file using excel. Although excel knows how to open an html file, it prompts you to be sure.
Consider using the excelxp tagset to save the file as an XML file.
ods tagsets.excelxp file= "c:\report.xml";
Proc tabulate data=sashelp.class;
class sex age;
var height;
table age,sex*height*mean;
run;
ods tagsets.excelxp close;
Hi Art, I'm too facing a similar issue. Although I divert the output to XML still I get a prompt (window named as File Download) whether to Open or Save or Cancel. Is there any option like NoPrompt or open_excel="no"? I'm using sheet_name=" " option as I got to load data into multiple tabs.
ODS TAGSETS.EXCELXP FILE ="C:\.....\FILENAME.XML";
TITLE " Title for 1st sheet";
ODS TAGSETS.EXCELXP OPTIONS(SHEET_NAME="SUMMARY" EMBEDDED_TITLES="yes" ABSOLUTE_COLUMN_WIDTH='10,15,8,....');
Proc Steps....
TITLE " ";
TITLE " Title for 2nd sheet";
ODS TAGSETS.EXCELXP OPTIONS(SHEET_NAME="DATA" EMBEDDED_TITLES="yes" ABSOLUTE_COLUMN_WIDTH='10,15,8,....');
Proc Steps....
TITLE " ";
ODS _ALL_ CLOSE;
Look forward for your valuable suggestions, Pawan
It worked. Thank You!!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.