Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Question: Saving table result


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Question: Saving table result
Date   Tue, 17 Feb 2004 17:49:58 -0000

That "have to" is not clear. However, probably 
quickest just to copy and paste. 

Shannon Driver of StataCorp wrote this 
on Statalist a while ago. The instructions 
for Excel presumably resemble those for Word, 
but you would know what to change better than I do. 

--------------------

Question:

> I would like to save a table constructed using the tabstat command in a
> form that makes it easy to convert it into a table in Word.  I'm
> guessing I need to somehow save it as an ascii file, then use Word's
> convert-text-to-table option.  But I can't figure out how to save it as
> an ascii file.  Any ideas?

Answer:

Stata has a "Copy Table" feature that you might find very useful in situations
such as this.  The first thing you would want to do is make sure you have this
feature's options set to best fit your task.

To do this, click on Edit in Stata's menubar.  Next, click on Table Copy 
Options.  In this case, you would probably want to remove all of the Vertical
bars, so make sure "Remove all" is selected.  Now, click OK.

The next thing to do is highlight the table in the Stata Results window.  After
that, click on Edit and then Copy Table.  

Open up MS Word (if not already open) and click on Edit and then Paste.  Once
again, highlight your table and then click on Table and then Convert Text to
Table.  You will then need to specify "Tabs" under the "Separate text at" if it
is not already selected.  When you click on OK, your table will be created.

-----------------------------

Nick 
[email protected] 

[email protected]
> 
> I have a simple question.
> I conducted "tabstat"(see below)command for my data.
> How can I save the result table as a data file?
> I have to import the result table into EXCEL.
> Please help me out.
> Thanks.
> sugie
> 
> -----------------------------------------------------
> .tabstat pop7 pop8 pop9 pop0, by(city) stats(sum) save
> 
> Summary statistics: sum
>   by categories of: city
> 
> city  |      pop7      pop8      pop9      pop0
> ------+----------------------------------------
> city_A|      8695      8739      7132      9488
> city_B|    956612    760833    683461    642044
> city_C|    751015    695510    655468    644137
> city_D|    346775    433034    484904    567810
> ------+----------------------------------------
> Total |   2063097   1898116   1830965   1863479
> -----------------------------------------------

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index