07-24-2014 05:21 AM
Any one can help how to send the same SAS HTML OUTPUT into a two locations.
I have a two paths like below;
Then i want to save my SAS html output into a excel, the below basic code is saving only one output for one path only.
ODS HMTL FILE="C:\Shiva\TEMP.XLS";
My query is same output want to save in two or more paths.
Could you please help me to overcome this situation.
07-24-2014 11:40 AM
The problem with having 2 ODS HTML statements (without any unique identifier) is that only 1 instance of a destination can be open at any time in a step. But, when the ODS destination has a unique ID= value, then ODS can have 2 (or more) instances of the same destination open at the same time. You need to investigate the use of the ID= option in order to open 2 instances of the same destination at the same time:
ods html(id=1) file='c:\temp\report1.html' style=analysis;
ods html(id=2) file='c:\temp\output\report2.html' style=sasweb;
proc print data=sashelp.class;
ods _all_ close;
And, just to clarify what you are doing ... you said "Then i want to save my SAS html output into a excel" -- when you use ODS HTML, you are NOT, NOT, NOT creating a "true, binary" Excel file by naming the file with the .XLS file extension. All you are doing is "fooling" the Windows registry into launching Excel when you double click on the file name. If you look inside the file you create with ODS HTML (using NOTEPAD or any Text Editor --not Microsoft Word), then you will see HTML tags.