Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: copying and pasting data from stata to excel


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: copying and pasting data from stata to excel
Date   Sun, 30 Sep 2007 13:12:20 -0700

Yun Liu wrote:

When I copy data from stata browser and then paste them in an excel
spreadsheet, the missing data are not treated correctly. For example,
in stata I have:
var1       var2          var3
1           .               3

After I paste them to excel, they become:
var1       var2          var3
1           3

How to deal with it? Thank you!

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

I cannot reproduce your problem:  the first value, middle missing value and
following value are all pasted correctly regardless of whether I (i) create
the dataset in Stata at the command line or in the data editor, (ii) copy
the row of data from either the data editor or data browser, and (iii) paste
the row using <paste special | text>, <paste special | Unicode text> or just
<paste>.  Copy and paste were both done using the mouse.  var1 and var2 both
byte, var3 either byte or str1 (didn't make any difference).

Windows XP Pro SP-2; Excel 2000 SP-3; Stata 10, executable 2007-07-25,
ado-files 2007-09-19, Data Editor Preferences all checked
(ticked)--Auto-preserve, Include variable names on copy to clipboard, Copy
value labels instead of numbers

Joseph Coveney

P.S. Copy and paste are great for informal activity, but I'd recommend
subsetting your dataset and then either -outsheet- that Carter Rees
suggested or -odbc-, or some other documentable, reproducible method for any
work that you want taken seriously.


*
*   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