Hi Team,
I was trying to use ODS tagsets so that Formats apply accordingly. Otherwise with just the Export to Excel formats were not getting applied in the sheet.
I thought I could Just use:
ods tagsets.excelxp file="C:drive\colect121011001(2)\colect.xml";
data final;
set procedures_descrip2;
run;
ods tagsets.excelxp close;
BUT ONLY AFTER USING THE BELOW CODE I GET THE RESULT.
ods listing close;
ods tagsets.excelxp file="C:\Data\Projects\Colectomy-20121011001(2)\colectomy.xml";
data final;
set procedures_descrip2;
file print ods;
put _ods_;
run;
ods tagsets.excelxp close;
ods listing;
My Question is why do we have to use statements???
ods listing
file print ods
put _ods_
Regards
ODS basically handles print output. A data step by itself doesn't create any output unless you use one of the options to create "print" data. The FILE PRINT ODS; statement says "if this data step creates any print type output, direct it to the ODS handler". The PUT _ODS_; says to create the print type output.
The ODS listing is to reopen the output destination after you had closed it with the ODS LISTING CLOSE; statement.
Without that your next output attempt would like generate a "No output destinations are open" error. It is only needed if you have closed the listing destination, i.e. the output window in 9.2 and earlier.
ODS basically handles print output. A data step by itself doesn't create any output unless you use one of the options to create "print" data. The FILE PRINT ODS; statement says "if this data step creates any print type output, direct it to the ODS handler". The PUT _ODS_; says to create the print type output.
The ODS listing is to reopen the output destination after you had closed it with the ODS LISTING CLOSE; statement.
Without that your next output attempt would like generate a "No output destinations are open" error. It is only needed if you have closed the listing destination, i.e. the output window in 9.2 and earlier.
Hi,
Thanks a lot for the detailed information.
Regards
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.