Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • export command installation and how to copy data to excel

    Dear members,

    I am a beginner in stata, and would like to ask you how to you export tables to excel?

    Copy pasting messes up when there are long names of variables, or when there are too many observations in the table (in which case, the scroll up does not happen anymore).

    Commands such as eststab are unrecognized and I am using Stata 15.1.

    For example, take the following dataset and table and please help me understand how I can put it in excel directly.

    .sysuse auto
    .tab foreign length

    If I need to install commands, it will be very helpful if you can help me with it, along with the syntax when I use it.

    Thanks in advance,
    Kusum

  • #2
    Hi Kusum,

    eststab is a user-written package and so has to be installed before Stata will recognize it. To install it directly, you type
    Code:
    ssc install estout
    You might also find the user-written packages outreg2, tabout, putdoc, summtab or tab2xl to be helpful. (Go to Help > Search > Search all within Stata).

    For small things (like tab foreign length), it is often easier to right click on the table in the Stata results window and select "Copy Table" and then paste it directly into Excel. You may will need to fiddle with it a little at that point or use Excel's "Text to Columns" feature (Data > Text to Columns), but this manual method is often the fastest way to get things into Excel.

    Hope that helps!
    --David



    Comment

    Working...
    X