HI,
Can we change .lst file into word document file? so that it is easier to share?
Thanks,
Archana
I would recommend switching to ODS RTF instead, by embedding your code between ODS RTF statements.
RTF files can be opened by Word.
ods rtf file='sample.rtf' style=meadow bodytitle;
title 'this is my sample output';
proc means data=sashelp.class;
run;
title 'this is a different table';
proc freq data=sashelp.cars;
table make*model/list;
run;
ods rtf close;
One way, I'm sure not the only way, is use ODS and set the output destination to html and from there you can read the file into MS-Word, MS-Excel, and a lot of other things. It's two steps, but I do not seem to recall ever seeing .docx as an ODS destination.
ods rtf file="C:\path\documentname.rtf";
/* any procedures that generate list output*/
ods rtf close;
Will send all of the procedures withing the ODS "sandwich" (ods rtf/ ods rtf close statements) to the specified file. Word reads RTF files.
Note that you have options to change the ODS style which controls font, fontsize, color and other appearance option as well as behviors for titles (in Word header or body of document) and others.
I would recommend switching to ODS RTF instead, by embedding your code between ODS RTF statements.
RTF files can be opened by Word.
ods rtf file='sample.rtf' style=meadow bodytitle;
title 'this is my sample output';
proc means data=sashelp.class;
run;
title 'this is a different table';
proc freq data=sashelp.cars;
table make*model/list;
run;
ods rtf close;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.