LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 25 Oct 2004 20:40:39 -0700
Reply-To:     Avram Aelony <aavram@MAC.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Avram Aelony <aavram@MAC.COM>
Subject:      Re: Mixing Word text and SAS tables - ideas?
In-Reply-To:  <2u5runF263cabU1@uni-berlin.de>
Content-Type: text/plain; charset=US-ASCII; format=flowed

You mention that you can do this easily in LaTeX. Have you considered writing SAS code that outputs marked-up LaTex?? (could be slightly painful). Then let the LaTeX engine convert to rtf...

just a thought (untested).

regards,

Avram

On Oct 25, 2004, at 7:44 PM, Richard A. DeVenezia wrote:

> Paul Thompson wrote: >> We are writing a number of documents. The problem here lies in the >> maintainance of said documents so that the .rtf output of a SAS table >> can be linked to the document so that the document stays current. >> >> I can easily do this in LaTeX. However, we have not done it in Word. >> >> Has anyone solved this problem? A solution involves >> >> 1) a simple output of a table to a file >> 2) an inclusion of that table into a word document >> 3) opening the word document sucks in the updated tables so that the >> document stays current. >> >> additionally, it would be nice if we could update INCIDENTAL comments >> in the text > > Suppose you have some report document containing narrative and tables, > such > that the table contents are to be dynamic. > > Here is an example to get the idea rolling > > Step 1. Create some output. > ods csv file='c:\temp\class.csv'; > proc report data=sashelp.class nowd; > run; > ods csv close; > > Step 2. Create a new Word document > - Activate database toolbar > - Select Insert Database > - Click Get Data > - Enter c:\temp\class.csv > - Open > - Click Table AutoFormat > - Select Colorful 2 > - OK > - Click Insert Data > - Activate Insert data as field > - OK > Your document now shows a table populated with data from an earlier > SAS run > Save the file as CLASS.DOC > > Step 3. Update the doc external data by submitting a SAS program again > ods csv file='c:\temp\class.csv'; > proc report data=sashelp.class nowd; > proc report data=sashelp.class nowd noheader ; > run; > ods csv close; > > Step 4. Update the table in the doc > - Click in a cell in the table > - Press F9 > > You should get the idea. > One shortcut to updated all fields in a doc - Ctrl A, F9 > > I don't know if there is a secure way to force all fields to always > update > when the document is opened. That behaviour might be more in the vein > of > inserted objects. Something like Insert/Object, CreateFromFile, > Activate > Link to file, Filename: c:\temp\class.csv > > Also, perhaps the new SAS excel table plugin also works in word. > > -- > Richard A. DeVenezia > http://www.devenezia.com/ >


Back to: Top of message | Previous page | Main SAS-L page