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

Re: st: RE: Exporting Tables

From   "Danielle H. Ferry" <>
To   StataList <>
Subject   Re: st: RE: Exporting Tables
Date   Fri, 20 Jun 2003 22:22:36 -0400

The method Bryan mentions is what I have used in the past, but it is only
worth the effort in my opinion if the table format you require cannot be
produced automatically using the -tabulate- or -table- commands. As I
understand Brandon's question, he is satisfied w/ the table output produced
by Stata but would like to avoid copying & pasting into Excel. Using
-postfile- will require you use something like -listtex- or -outfile- to
convert the new dataset into text format and then insert this into Excel
making use of "Get External Data" or "Text to Columns". In other words, it
won't save any steps.

-Danielle H. Ferry

On 6/20/03 5:58 PM, "Sayer, Bryan" <> wrote:

> Though I haven't done it in Stata, one general strategy is to create an
> output data set (now that postfile allows character variables), accumulate
> all of the tables you are interested in, and then use something to export
> the dataset, rather than the output, to Excel.  StatTransfer or DBMSCopy for
> example, or the newish ODBC driver thing.  You just have to remember to have
> variables like RowVar and ColVar that take on the values of the NAME of the
> variable, and RowVal (ColVal) that take of the VALUES of the row variable,
> plus the actual output that you are interested in.
> Bryan Sayer
> Statistician, SSS Inc.
> -----Original Message-----
> From: BDupont
> To:
> Sent: 6/20/03 1:14 PM
> Subject: st: Exporting Tables
> Hi all,
> I am trying to export tables from the tabulate and svytab commands into
> Excel.
> I know that the "copy table" option is useful in doing this from the
> log file
> or the output screen directly, but I'm curious as to how to have STATA
> do this
> automatically.  Is there some way to automate the copy table option so
> that
> all of the tables I create get dumped into an Excel file without having
> to
> manually copy them?
> Thanks in advance!
> Brandon Dupont
> *
> *   For searches and help try:
> *
> *
> *
> *
> *   For searches and help try:
> *
> *
> *

Danielle H. Ferry
National Bureau of Economic Research
365 Fifth Avenue, 5th Floor
New York, NY 10016

*   For searches and help try:

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