Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to get Stata 10 to export formatted tables to microsoft word or excel?


From   Roger Newson <r.newson@imperial.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: How to get Stata 10 to export formatted tables to microsoft word or excel?
Date   Thu, 5 Aug 2010 14:13:14 +0100

The solution I use is the -rtfutil- and -listtab- packages, downloadable from SSC (if you have Stata 11) or from my website (if you have Stata 10). These packages can be used to export arbitrary Stata datasets to tables in Rich Text Format documents, without manual intervention. To use them, you need first to convert your results to Stata datasets, with 1 observation per row of the table you want. These datasets are known as resultssets. Packages that create them include -parmest-, -xcollapse- and -xcontract-. Programming with resultssets is described in detail in references in the on-line help for -listtab-.

However, if you don't like programming, then you probably won't like working with resultssets. In that case, you should probably use -estout-, which can also produce .rtf documents containing tables. However, you may then need to do a bit of manual intervention with mice, if you want to produce the table you really wanted.

I hope this helps.

Best wishes

Roger


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

On 05/08/2010 13:33, Faiz Rasool wrote:
Hi all:

I'm new to Stata and to this email list. I'm a Blind student. I'm interested
to find out the ways of exporting tables to Microsoft word or excel in a way
that requires little manual formatting specially formatting that involves a
use of mouse. The information I've search on the internet regarding tables
produced by stata and moving them to word has largely suggested that 1
select the table in the results window, 2 select remove  | from the table
copy option, 3 paste it to a word processor of choice. Their are two basic
issues with this approach that do not allow me to follow it. 1 The table can
only be highlighted using a mouse. 2 The screen reading software that I use
does not read the contents of the results window,  it works fine with  menus
and variables window though. Presently I've to  coppy the entire results
window and paste it into microsoft word. Using this approach tables are not
at all formatted and I've to coppy and paste after every command to see what
is its output. Ideally I'd like that their is an option that lets me export
tables in formatted form, or require little input from a mouse in formatting
them. By tables I'm refering to all forms of tables from summary statistics
to regression results. I'm sorry if it is not allowed to mention SPSS here.
But it does do what I've requested above. I Wish Stata has this facility
too.

Thanks all,
Faiz.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index