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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.