04-13-2015 01:55 AM
I tried to run the following program to produce xml output with two tabs in the excel. But it didn't work when I included "where" statement,
ODS LISTING CLOSE;
ODS tagsets.excelxp FILE="c:\example.xls";
ods tagsets.excelxp options(sheet_name="cars");
Proc print data=sashelp.cars;
ods tagsets.excelxp options(sheet_name="class");
Proc print data=sashelp.class;
ods tagsets.excelxp close;
04-13-2015 02:25 AM
What does the log say?
04-13-2015 04:56 AM
There is a LOT more than just error message(s) to be found in the log. I guess you will find a
NOTE: No observations were selected from data set SASHELP.CLASS.
NOTE: There were 0 observations read from the data set SASHELP.CLASS.
WHERE 0 /* an obviously FALSE WHERE clause */ ;
message in the log, which will give you a clue that the where condition is the culprit and must be examined in depth.
04-13-2015 05:09 AM
And be aware when inspecting your data that SAS may show you formatted values, while the where condition needs the raw, unformatted values to work.