Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Outsheet truncates character variable


From   "Downey, Patrick" <[email protected]>
To   <[email protected]>
Subject   st: Outsheet truncates character variable
Date   Wed, 16 Mar 2011 12:33:01 -0400

Hello,

I am exporting a Stata dataset as a csv. I use the drop down menu:
File > Export > Comma or tab separated data
and change the delimiter to comma separated. I believe this code is
equivalen:
outsheet using "K:\Folder\filename.csv", comma replace

It is a large dataset with 63,000 observations and 650 variables. One
particular set of variables I'm interested in is a series of ten character
variables: Charge1-Charge10. The first 9 of these variables exports fine,
but the last one (Charge10) only exports the first two characters. 
tab Charge10 
indicates that many observations have values much longer than 2 characters.

I don't understand why only one variable appears to be truncated. If anyone
can help, it would be greatly appreciated.

Thanks,
Mitch

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index