01-25-2018 10:34 AM
Hello SAS experts,
I use proc tabulate to create some tables and would like to output to excel file. My codes work if I do not use ODS to output to excel, however it does not work when I want it output to excel. The log window did not show any thing wrong, but I can not open xml file. I use SAS 9.3 version. Here is my code.
ODS listing close; /*Turn off the standard line printer destination*/
ods tagsets.ExcelXP path="&dir."
style=statistical /*Styles to control appearance of output*/;
ods tagsets.ExcelXP options ( sheet_name= "Jurisdiction" autofit_height= 'yes' );
proc tabulate data=alldata;
class state subjects grade attempt_status;
table state, subjects=" "*(attempt_status=" " all="Total"), grade=" "*( N='Count'*f=comma8. rowpctn*f=mypct.) all;
ods _all_ close;
there are 54 states and 5 subjects.
Thanks for any suggestion.
01-25-2018 10:43 AM
Does a different ODS destination work, say ODS PDF?
Also, what does this mean?
The log window did not show any thing wrong, but I can not open xml file
Do you get an error of any kind?
01-25-2018 11:11 AM
01-25-2018 11:13 AM
The PDF is to test that you're getting any output and there isn't something else isn't wrong. I'm not suggesting you change your requirements, it's a debugging step.
Thanks for the reply Reeza,
The log window did not have any error sign and it seems it is ok for the code. However, it shows something wrong when I open the XML file. I attached the capture here. I need xml file to reload the output data to SAS, so the PDF output is not my choice.